Skip to content
Permalink
Browse files
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.
  • Loading branch information
annevk authored and zcorpan committed May 26, 2016
1 parent a932f7d commit fc90400dfd72fd99072668248161c90c993014bc
Showing with 14 additions and 12 deletions.
  1. +14 −12 source
26 source
@@ -82470,11 +82470,11 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O

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

<p>For HTML documents (and <span data-x="HTML MIME type">HTML MIME types</span>), the following
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
fail</span> on <var>fragid bytes</var>. If <var>decoded fragid</var> is failure, jump to the step
labeled <i>no decoded fragid</i>.</p></li>

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

<li><p><i>No decoded fragid</i>: If there is an <code>a</code> element in the DOM that has a <code
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
element in <span>tree order</span> is <span>the indicated part of the document</span>; stop the algorithm
here.</p></li>
<li><p><i>No decoded fragid</i>: If there is an <code>a</code> element <span data-x="in a
document">in the document</span> that has a <code 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 element in <span>tree order</span> is <span>the indicated part of the
document</span>; stop the algorithm here.</p></li>

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

0 comments on commit fc90400

Please sign in to comment.