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

53 lines
993 B
TOML

[package]
name = "browser_runtime"
version = "0.1.0"
edition = "2021"
publish = false
# The browser runtime orchestrates browsing contexts and user-visible browser behavior.
# Owns:
# - tabs and browsing contexts
# - navigation lifecycle
# - session/history
# - permission decisions (policy)
# Depends on engine crates via narrow interfaces.
[lib]
path = "src/lib.rs"
[dependencies]
# Internal crates (downward dependencies)
web_api = { path = "../web_api" }
dom = { path = "../dom" }
net = { path = "../net" }
storage = { path = "../storage" }
shared = { path = "../shared" }
# Logging / tracing
tracing.workspace = true
log.workspace = true
# Error handling
anyhow.workspace = true
thiserror.workspace = true
# Utilities
once_cell.workspace = true
smallvec.workspace = true
indexmap.workspace = true
# --- Feature flags ---
[features]
default = []
# Enable stricter checks and extra invariants useful in development.
dev_invariants = []
# --- Lints ---
[lints]
workspace = true