Files
Zachary D. Rowitsch 80565ce4cd Wire JS script execution into the page load pipeline
Split the rendering pipeline so scripts can execute between HTML parsing
and CSS/layout/paint. The event handler now:
1. Parses HTML into a Document
2. Extracts and fetches <script> sources (inline + external)
3. Resets JS state, sets the document, executes scripts, takes it back
4. Runs CSS/layout/paint on the (possibly mutated) document

Add script source extraction with type filtering (skips module/unknown),
src-takes-precedence-over-inline semantics, and external script fetching
via the network stack.

Add BrowserRuntime methods (prepare_for_navigation, set_document,
execute_script, take_document, swap_document) to manage the document
lifecycle around script execution and timer callbacks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 16:32:04 -05:00

993 B