Preserve owner interruptions during deferred script preparation and use the
current HTML stream and custom-element construction interfaces. Restore
body/window content-handler registration on the new child insertion path and
remove mutation adapters superseded by the shared parser lifecycle.
Validation: cargo fmt --all; strict all-feature workspace Clippy; cargo nextest
run --no-fail-fast (19,128 passed, 13 skipped). The nine child handler regressions
also pass in a focused run.
Yield live HTML script preparation to the document owner after releasing
parser borrows. Prepare from the current DOM after the guarded microtask
checkpoint, and abandon stale handoffs when that checkpoint replaces the
document. Apply the boundary to main documents, child documents, and
document.write; preserve eager parsing when no runtime owner is installed.
Admit parser async classic scripts after preparation and keep nested
script cleanup from draining microtasks while an outer script is running.
Add main/child integration coverage and update the two repaired WPT cases.
Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17,846 passed, 13 skipped
- 245 related WPT cases: all 231 previously passing cases remain passing
- Final CLI build: both repaired WPT cases pass on the validated sources
Distinguish empty or invalid external script URLs from internal parser preparation failures. Queue trusted element errors on the shared DOM-manipulation source for root, document.write, and child parser paths without reporting spurious Window exceptions.
Retain exact Document ownership, listener checkpoints, and already-started state. Cover stale tasks and reused PageVm-local ids, and record the two WPT cases verified in CLI and CDP modes.
* fix(parser): preserve text document MIME and encoding semantics
* fix(document): share literal text parsing across child document paths
* fix(document): construct projection parser with the public API
Return text mutation effects from parser sinks and deliver them through the shared notification pipeline after releasing the structural borrow. This keeps stylesheets and layout current when parser input is merged into existing text nodes, and delivers characterData records without replacing node identity.
Add main-document and iframe regressions for split stylesheet input, hit testing, and MutationObserver delivery. Restore the verified elementsFromPoint iframe WPT to the passed list.
Share parser mutation notifications between the main document and child
frames, with each owner retaining its resource and lifecycle work. Update
stylesheet owners incrementally so parser mutations preserve CSSOM edits.
Keep tokenizer pause reasons separate from DOM handle identity.
Add main/iframe regressions for reaction and observer ordering, form
association, stylesheet visibility, CSSOM edits, and nested frame identity.
Validation: cargo fmt --all; strict workspace clippy; cargo nextest run
--no-fail-fast (18,118 passed, 13 skipped).
Flush parser insertion reactions after the tree builder completes its current
token so connected callbacks run before children without retaining parser
borrows across JavaScript execution.
Keep one DocumentParserSession and expose a restricted insertion handle for
nested writes. Share input, suspension, cancellation, and close state so
blocked writes remain queued and outer feeds stop when nested parsing blocks
or replaces the document. Let the owning session finish deferred close and
dispatch readiness transitions once.
Reuse form-owner mutation detection for child parser insertions and add
regressions for reaction order, form association, nested writes, gated external
scripts, document replacement, and deferred close.
Validation: cargo fmt --all; strict workspace Clippy; cargo nextest run
--no-fail-fast (18,104 passed, 13 existing skips); release build.