Skip to content

Commit

Permalink
Use tree root instead of document as scoping root
Browse files Browse the repository at this point in the history
Fixes #240.
  • Loading branch information
a4sriniv authored Nov 14, 2023
1 parent a745cf2 commit 15dda3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion speculation-rules.bs
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ A <dfn>prerender candidate</dfn> is a [=struct=] with the following [=struct/ite
1. Return false.
1. If |predicate| is a [=document rule CSS selector predicate=], then:
1. [=list/For each=] |selector| of |predicate|'s [=document rule CSS selector predicate/selectors=]:
1. [=match a selector against an element|Match=] |selector| against |el| with the [=scoping root=] set to |el|'s [=Node/node document=]. If the result is true, return true.
1. [=match a selector against an element|Match=] |selector| against |el| with the [=scoping root=] set to |el|'s [=tree/root=]. If the result is true, return true.

During this step, user agents must apply the same privacy restrictions to the '':visited'' pseudo-class as they would to other selector matching logic that could be observed by authors (e.g., {{ParentNode/querySelector(selectors)}}).

Expand Down

0 comments on commit 15dda3d

Please sign in to comment.