Skip to content

Anchor relative :has() arguments to their subject - #201

Open
jdalton wants to merge 1 commit into
dperini:masterfrom
jdalton:fix/relative-has-anchor
Open

Anchor relative :has() arguments to their subject#201
jdalton wants to merge 1 commit into
dperini:masterfrom
jdalton:fix/relative-has-anchor

Conversation

@jdalton

@jdalton jdalton commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

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.

@jdalton
jdalton marked this pull request as ready for review September 5, 2026 19:42
@jdalton jdalton added the bug label Sep 5, 2026
@jdalton
jdalton force-pushed the fix/relative-has-anchor branch from 8b63327 to 36f19c8 Compare September 6, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant