Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify usage of beforematch event #11151

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -79012,9 +79012,8 @@ END:VCARD</pre>
data-x="navigate-fragid">fragment navigation</span>. When these features attempt to scroll to a
target which is in the element's subtree, the user agent will remove the <code
data-x="attr-hidden">hidden</code> attribute in order to reveal the content before scrolling to
it. In addition to removing the <code data-x="attr-hidden">hidden</code> attribute, an event named
<code data-x="event-beforematch">beforematch</code> is also fired on the element before the <code
data-x="attr-hidden">hidden</code> attribute is removed.</p>
it by running the <span>ancestor hidden-until-found revealing algorithm</span> on the target
node.</p>

<p>Web browsers will use 'content-visibility: hidden' instead of 'display: none' when the <code
data-x="attr-hidden">hidden</code> attribute is in the <span
Expand Down Expand Up @@ -79179,7 +79178,9 @@ END:VCARD</pre>

<ol>
<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
data-x="event-beforematch">beforematch</code> at <var>currentNode</var>.</p></li>
data-x="event-beforematch">beforematch</code> with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true at
<var>currentNode</var>.</p></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the order should be "Fire an event named e at target with..." per https://dom.spec.whatwg.org/#firing-events


<li><p>Remove the <code data-x="attr-hidden">hidden</code> attribute from
<var>currentNode</var>.</p></li>
Expand Down