Skip to content

Add opt-in legacy DOM reads and regression coverage - #203

Merged
jdalton merged 6 commits into
dperini:masterfrom
jdalton:feat/legacy-dom
Sep 7, 2026
Merged

Add opt-in legacy DOM reads and regression coverage#203
jdalton merged 6 commits into
dperini:masterfrom
jdalton:feat/legacy-dom

Conversation

@jdalton

@jdalton jdalton commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Change

Add opt-in legacy DOM reads, collection filtering, and traversal fallbacks. Mode changes clear query plans; document changes preserve the flag. Modern mode keeps direct reads.

Updated to current master. Disabled, enabled, required, and defined helpers now use the legacy accessors. The three previous expected failures are passing tests. The shared host fixture refreshes live collections after DOM mutations. The merged relative-selector fix uses legacy parent traversal for sibling arguments, with unit and WPT regressions for both sibling combinators.

Validation

  • 449 Node tests pass, with two inherited expected failures and five skips.
  • 45 WPT pages pass, including native comparisons using the shared legacy host fixture.
  • Type, lint, formatting, generated docs, and 22 packed-package tests pass locally.
  • Coverage passes increased thresholds: statements 79.78%, branches 70.49%, functions 80.31%, lines 78.27%. Engine coverage comes from WPT; adapter coverage comes from Node.

This does not transpile JavaScript, polyfill the runtime, or claim that historical browsers were tested. Separate property-read and query-routing optimizations remain outside this PR.

Minimums are now statements 79%, branches 70%, functions 80%, and lines 78%. Added WPT regressions for scoped duplicate IDs, fragments, comment-skipping traversal, raw URLs, namespaced attributes, and form IDs.

@jdalton
jdalton force-pushed the feat/legacy-dom branch 2 times, most recently from 81c9493 to 91670d6 Compare September 5, 2026 19:10
@jdalton
jdalton marked this pull request as ready for review September 5, 2026 19:42
@jdalton
jdalton force-pushed the feat/legacy-dom branch 2 times, most recently from 4a9bc0b to b9fa3b7 Compare September 6, 2026 02:30
@jdalton
jdalton merged commit 98ddc89 into dperini:master Sep 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant