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

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
jdalton added a commit that referenced this pull request Sep 17, 2026
* Add opt-in legacy DOM reads and regression coverage

* Refresh legacy validation and integration guidance

* Expand legacy host WPT coverage and raise coverage minimums
jdalton added a commit that referenced this pull request Sep 17, 2026
Consolidated commits:
- adba43d Evict from the resolver caches without Map.delete (#185)
  Original author: John-David Dalton <jdalton@users.noreply.github.com>
- 17a7467 Add opt-in legacy DOM reads and regression coverage (#203)
  Original author: John-David Dalton <jdalton@users.noreply.github.com>
- 47bad6d perf: streamline resolver execution, query plans and DOM reads
  Original author: John-David Dalton <jdalton@users.noreply.github.com>
- 341d50a Validate logical selector arguments before candidate matching
  Original author: jdalton <john.david.dalton@gmail.com>
- f74aaaa fix(selectors): defer hover tracking and integrate selector tests (#209)
  Original author: John-David Dalton <jdalton@users.noreply.github.com>
- 9dcf18c perf(selectors): route simple descendant chains through scoped lookups (#206)
  Original author: John-David Dalton <jdalton@users.noreply.github.com>
- 131347f fix(selectors): isolate lazy hover state by document (#207)
  Original author: John-David Dalton <jdalton@users.noreply.github.com>
- abdbc83 perf(selectors): filter candidates before ancestor traversal (#189)
  Original author: John-David Dalton <jdalton@users.noreply.github.com>
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