Anchor relative :has() arguments to their subject - #201
Open
jdalton wants to merge 1 commit into
Open
Conversation
jdalton
force-pushed
the
fix/relative-has-anchor
branch
from
September 6, 2026 02:30
8b63327 to
36f19c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tooling update
Rebased onto merged #212 as one commit. Sources and tests use
.mts, Node tests use Vitest, and the published JavaScript paths stay unchanged. The original engine changes are preserved.Local lint, formatting, Node and packed-package checks pass, with the documented expected failures retained. All 41 WPT pages pass against both generated builds.
Change
Extract relative :has() anchoring from #167. Keep explicit :scope tied to the outer query and restore the previous anchor after success or exceptions. Correct the archive implementation by anchoring every comma-separated argument, including later sibling arguments.
Validation: Node checks pass and 69 Chromium comparisons pass across document, element, and detached contexts. Two expected-failure regressions preserve inherited acceptance of nested :has() and pseudo-elements. Public isolation of the private anchor pseudo also needs review before merge.
The root sibling guards discussed in #169 are already in the master base. The top-level splitter is shared with #199; retain one identical helper when combining them. Commands and remaining work are in test/relative-has-testing.md.