Skip to content

Commit fc90400

Browse files
annevkzcorpan
authored andcommitted
Fragments can only point to nodes in documents
This clarifies that #foo and such can never point to a node in a shadow tree. Fixes #1192.
1 parent a932f7d commit fc90400

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

source

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82470,11 +82470,11 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
8247082470

8247182471
<p><dfn>The indicated part of the document</dfn> is the one that the <span
8247282472
data-x="concept-url-fragment">fragment</span>, if any, identifies. The semantics of the <span
82473-
data-x="concept-url-fragment">fragment</span> in terms of mapping it to a specific DOM Node is
82474-
defined by the specification that defines the <span>MIME type</span> used by the
82475-
<code>Document</code> (for example, the processing of <span
82476-
data-x="concept-url-fragment">fragments</span> for <span
82477-
data-x="XML MIME type">XML MIME types</span> is the responsibility of RFC7303). <ref spec=RFC7303></p>
82473+
data-x="concept-url-fragment">fragment</span> in terms of mapping it to a node is defined by the
82474+
specification that defines the <span>MIME type</span> used by the <code>Document</code> (for
82475+
example, the processing of <span data-x="concept-url-fragment">fragments</span> for <span
82476+
data-x="XML MIME type">XML MIME types</span> is the responsibility of RFC7303). <ref
82477+
spec=RFC7303></p>
8247882478

8247982479
<p>For HTML documents (and <span data-x="HTML MIME type">HTML MIME types</span>), the following
8248082480
processing model must be followed to determine what <span>the indicated part of the
@@ -82496,14 +82496,16 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
8249682496
fail</span> on <var>fragid bytes</var>. If <var>decoded fragid</var> is failure, jump to the step
8249782497
labeled <i>no decoded fragid</i>.</p></li>
8249882498

82499-
<li><p>If there is an element in the DOM that has an <span data-x="concept-id">ID</span> exactly
82500-
equal to <var>decoded fragid</var>, then the first such element in <span>tree order</span> is
82501-
<span>the indicated part of the document</span>; stop the algorithm here.</p></li>
82499+
<li><p>If there is an element <span data-x="in a document">in the document</span> that has an
82500+
<span data-x="concept-id">ID</span> exactly equal to <var>decoded fragid</var>, then the first
82501+
such element in <span>tree order</span> is <span>the indicated part of the document</span>; stop
82502+
the algorithm here.</p></li>
8250282503

82503-
<li><p><i>No decoded fragid</i>: If there is an <code>a</code> element in the DOM that has a <code
82504-
data-x="attr-a-name">name</code> attribute whose value is exactly equal to <var>fragid</var> (<em>not</em> <var>decoded fragid</var>), then the first such
82505-
element in <span>tree order</span> is <span>the indicated part of the document</span>; stop the algorithm
82506-
here.</p></li>
82504+
<li><p><i>No decoded fragid</i>: If there is an <code>a</code> element <span data-x="in a
82505+
document">in the document</span> that has a <code data-x="attr-a-name">name</code> attribute
82506+
whose value is exactly equal to <var>fragid</var> (<em>not</em> <var>decoded fragid</var>), then
82507+
the first such element in <span>tree order</span> is <span>the indicated part of the
82508+
document</span>; stop the algorithm here.</p></li>
8250782509

8250882510
<li><p>If <var>fragid</var> is an <span>ASCII case-insensitive</span> match for the
8250982511
string <code data-x="">top</code>, then <span>the indicated part of the document</span> is the top

0 commit comments

Comments
 (0)