Skip to content

Commit

Permalink
Fragments can only point to nodes in documents
Browse files Browse the repository at this point in the history
This clarifies that #foo and such can never point to a node in a shadow
tree. Fixes #1192.
  • Loading branch information
annevk committed May 25, 2016
1 parent 177b8a5 commit 85cab97
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions source
Expand Up @@ -82463,11 +82463,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
Expand All @@ -82489,14 +82489,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
Expand Down

0 comments on commit 85cab97

Please sign in to comment.