Skip to content

Commit 1aa6fb0

Browse files
authored
Editorial: update Selectors integration
Also correct createContextualFragment() link. Fixes #1130.
1 parent 6b3f055 commit 1aa6fb0

File tree

1 file changed

+11
-33
lines changed

1 file changed

+11
-33
lines changed

dom.bs

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ urlPrefix: https://www.w3.org/TR/xml/#NT-
1919
urlPrefix: https://www.w3.org/TR/xml-names/#NT-
2020
type: type
2121
text: QName; url: QName
22-
url: https://w3c.github.io/DOM-Parsing/#dfn-createcontextualfragment-fragment
22+
url: https://w3c.github.io/DOM-Parsing/#dom-range-createcontextualfragment
2323
type: method; text: createContextualFragment(); for: Range
2424
type: interface
2525
url: https://w3c.github.io/touch-events/#idl-def-touchevent
@@ -174,23 +174,6 @@ object is its first <a>following</a>
174174

175175
<h3 id=selectors>Selectors</h3>
176176

177-
<!--
178-
To <dfn export>match a relative selectors string</dfn> <var>relativeSelectors</var>
179-
against a <var>set</var>, run these steps:
180-
181-
<ol>
182-
<li>Let <var>s</var> be the result of
183-
<a>parse a relative selector</a> from
184-
<var>relativeSelectors</var> against <var>set</var>.
185-
[[!SELECTORS4]]
186-
187-
<li>If <var>s</var> is failure, <a>throw</a> a "{{SyntaxError!!exception}}" {{DOMException}}.
188-
189-
<li>Return the result of <a>evaluate a selector</a> <var>s</var>
190-
using <a>:scope elements</a> <var>set</var>. [[!SELECTORS4]]
191-
</ol>
192-
-->
193-
194177
<p>To <dfn export>scope-match a selectors string</dfn> <var>selectors</var> against a
195178
<var>node</var>, run these steps:
196179

@@ -6840,25 +6823,20 @@ are:
68406823
<p>The <dfn method for=Element><code>closest(<var>selectors</var>)</code></dfn> method steps are:
68416824

68426825
<ol>
6843-
<li>Let <var>s</var> be the result of
6844-
<a>parse a selector</a> from <var>selectors</var>.
6826+
<li><p>Let <var>s</var> be the result of <a>parse a selector</a> from <var>selectors</var>.
68456827
[[!SELECTORS4]]
68466828

6847-
<li>If <var>s</var> is failure, <a>throw</a> a
6848-
"{{SyntaxError!!exception}}" {{DOMException}}.
6829+
<li><p>If <var>s</var> is failure, then <a>throw</a> a "{{SyntaxError!!exception}}"
6830+
{{DOMException}}.
68496831

6850-
<li>Let <var>elements</var> be <a>this</a>'s
6851-
<a for=tree>inclusive ancestors</a> that are
6852-
<a for=/>elements</a>, in reverse
6853-
<a>tree order</a>.
6832+
<li><p>Let <var>elements</var> be <a>this</a>'s <a for=tree>inclusive ancestors</a> that are
6833+
<a for=/>elements</a>, in reverse <a>tree order</a>.
68546834

6855-
<li>For each <var>element</var> in <var>elements</var>, if
6856-
<a>match a selector against an element</a>, using
6857-
<var>s</var>, <var>element</var>, and
6858-
<a>:scope element</a> <a>this</a>,
6859-
returns success, return <var>element</var>. [[!SELECTORS4]]
6835+
<li><p>For each <var>element</var> in <var>elements</var>, if
6836+
<a>match a selector against an element</a>, using <var>s</var>, <var>element</var>, and
6837+
<a>scoping root</a> <a>this</a>, returns success, return <var>element</var>. [[!SELECTORS4]]
68606838

6861-
<li>Return null.
6839+
<li><p>Return null.
68626840
</ol>
68636841

68646842
<p>The <dfn method for=Element><code>matches(<var>selectors</var>)</code></dfn> and
@@ -6873,7 +6851,7 @@ are:
68736851
{{DOMException}}.
68746852

68756853
<li><p>If the result of <a>match a selector against an element</a>, using <var>s</var>,
6876-
<a>this</a>, and <a>:scope element</a> <a>this</a>, returns success, then return true; otherwise,
6854+
<a>this</a>, and <a>scoping root</a> <a>this</a>, returns success, then return true; otherwise,
68776855
return false. [[!SELECTORS4]]
68786856
</ol>
68796857

0 commit comments

Comments
 (0)