Skip to content

Commit

Permalink
Correctly find upgrade candidates during custom element definition
Browse files Browse the repository at this point in the history
The previous imprecise language implied that shadow trees should be excluded. In fact, they should be included. Fixes #1263.
  • Loading branch information
domenic authored and annevk committed May 17, 2016
1 parent 999e9d8 commit edda04a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions source
Expand Up @@ -3143,12 +3143,11 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#dom-node-textcontent"><code>textContent</code></dfn> attribute</li>

<li>The <dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#concept-tree">tree</dfn> and <dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#concept-shadow-tree">shadow tree</dfn> concepts</li>
<li>The <dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#concept-tree-order">tree order</dfn> concept</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-tree-order">tree order</dfn> and <dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-including-tree-order">shadow-including tree order</dfn> concepts</li>
<li>The <dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#concept-tree-root">root</dfn> concept</li>
<li>The <dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#concept-tree-inclusive-ancestor">inclusive ancestor</dfn> concept</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-tree-inclusive-ancestor">inclusive ancestor</dfn> and <dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-including-descendant">shadow-including descendant</dfn> concepts</li>
<li>The <dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#document-element">document element</dfn> concept</li>
<li>The <dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#in-a-document">in a document</dfn> concept</li>
<li>The <dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#in-a-shadow-including-document">in a shadow-including document</dfn> concept</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#in-a-document">in a document</dfn> and <dfn data-x-href="https://dom.spec.whatwg.org/#in-a-shadow-including-document">in a shadow-including document</dfn> concepts</li>
<li>The <dfn data-noexport="" data-x="concept-slot" data-x-href="https://dom.spec.whatwg.org/#concept-slot">slot</dfn> concept, and its <dfn data-noexport="" data-x="slot-name" data-x-href="https://dom.spec.whatwg.org/#slot-name">name</dfn> and <dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#slot-assigned-nodes">assigned nodes</dfn></li>
<li>The <dfn data-noexport="" data-x="finding flattened slotables" data-x-href="https://dom.spec.whatwg.org/#find-flattened-slotables">find flattened slotables</dfn> algorithm</li>
<li>The <dfn data-noexport="" data-x-href="https://dom.spec.whatwg.org/#concept-node-pre-insert">pre-insert</dfn>, <dfn data-noexport="" data-x="concept-node-insert" data-x-href="https://dom.spec.whatwg.org/#concept-node-insert">insert</dfn>, <dfn data-noexport="" data-x="concept-node-append" data-x-href="https://dom.spec.whatwg.org/#concept-node-append">append</dfn>, <dfn data-noexport="" data-x="concept-node-replace" data-x-href="https://dom.spec.whatwg.org/#concept-node-replace">replace</dfn>, <dfn data-noexport="" data-x="concept-node-remove" data-x-href="https://dom.spec.whatwg.org/#concept-node-remove">remove</dfn>, and <dfn data-noexport="" data-x="concept-node-adopt" data-x-href="https://dom.spec.whatwg.org/#concept-node-adopt">adopt</dfn> algorithms for nodes</li>
Expand Down Expand Up @@ -66291,10 +66290,12 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
data-x="concept-relevant-global">relevant global object</span>'s <span
data-x="concept-document-window"><code>Document</code> object</span>.</p></li>

<li><p>Let <var>upgrade candidates</var> be all elements in <var>document</var> whose namespace
is the <span>HTML namespace</span> and whose local name is <var>localName</var>, in tree
order. Additionally, if <var>extends</var> is non-null, only include elements that have an
attribute named <code data-x="attr-is">is</code> whose value is <var>name</var>.</p></li>
<li><p>Let <var>upgrade candidates</var> be all elements that are <span data-x="shadow-including
descendant">shadow-including descendants</span> of <var>document</var>, whose namespace
is the <span>HTML namespace</span> and whose local name is <var>localName</var>, in
<span>shadow-including tree order</span>. Additionally, if <var>extends</var> is non-null, only
include elements that have an attribute named <code data-x="attr-is">is</code> whose value is
<var>name</var>.</p></li>

<li><p>For each element <var>element</var> in <var>upgrade candidates</var>, <span>enqueue a
custom element upgrade reaction</span> given <var>element</var> and
Expand Down

0 comments on commit edda04a

Please sign in to comment.