Skip to content

Commit

Permalink
Save the is="" value an element was created with
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic authored and annevk committed Jun 3, 2016
1 parent 60fac51 commit 754bb8d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
23 changes: 14 additions & 9 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5041,7 +5041,7 @@ a <var>document</var>, run these steps:

<li>
<p>For each <var>inclusiveDescendant</var> in <var>node</var>'s
<a>shadow-including inclusive descendants</a> that is an <a>element</a> with
<a>shadow-including inclusive descendants</a> that is an <a for=/>element</a> with
<a>custom element state</a> of "<code>custom</code>", set <var>inclusiveDescendant</var>'s
<a>custom element state</a> to "<code>undefined</code>".</p>

Expand Down Expand Up @@ -5591,8 +5591,9 @@ dictionary ShadowRootInit {
<p><a for=/>Elements</a> have an associated
<dfn export id=concept-element-namespace for=Element>namespace</dfn>,
<dfn export id=concept-element-namespace-prefix for=Element>namespace prefix</dfn>,
<dfn export id=concept-element-local-name for=Element>local name</dfn>, and
<dfn export id=concept-element-custom-element-state for=Element>custom element state</dfn>. When an
<dfn export id=concept-element-local-name for=Element>local name</dfn>,
<dfn export id=concept-element-custom-element-state for=Element>custom element state</dfn>, and
<dfn export id=concept-element-is-value for=Element><code>is</code> value</dfn>. When an
<a for="/">element</a> is <a lt="create an element">created</a>, all of these values are
initialized.

Expand Down Expand Up @@ -5682,8 +5683,9 @@ given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and opt
<li><p>Set <var>result</var> to a new <a for=/>element</a> that implements <var>interface</var>,
with no attributes, <a for=Element>namespace</a> set to the <a>HTML namespace</a>,
<a for=Element>namespace prefix</a> set to <var>prefix</var>, <a for=Element>local name</a> set
to <var>localName</var>, <a>custom element state</a> set to "<code>undefined</code>", and
<a>node document</a> set to <var>document</var>.
to <var>localName</var>, <a>custom element state</a> set to "<code>undefined</code>",
<a><code>is</code> value</a> set to <var>is</var>, and <a>node document</a> set to
<var>document</var>.

<li><p>If the <var>synchronous custom elements flag</var> is set,
<a lt="upgrade an element">upgrade</a> <var>element</var> using <var>definition</var>.
Expand Down Expand Up @@ -5735,6 +5737,8 @@ given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and opt
<var>localName</var>, then <a>throw</a> a {{NotSupportedError}}.

<li><p>Set <var>result</var>'s <a for=Element>namespace prefix</a> to <var>prefix</var>.

<li><p>Set <var>result</var>'s <a><code>is</code> value</a> to null.
</ol>
</li>

Expand All @@ -5745,8 +5749,8 @@ given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and opt
<li><p>Set <var>result</var> to a new <a for=/>element</a> that implements the {{HTMLElement}}
interface, with no attributes, <a for=Element>namespace</a> set to the <a>HTML namespace</a>,
<a for=Element>namespace prefix</a> set to <var>prefix</var>, <a for=Element>local name</a> set
to <var>localName</var>, <a>custom element state</a> set to "<code>undefined</code>", and
<a>node document</a> set to <var>document</var>.
to <var>localName</var>, <a>custom element state</a> set to "<code>undefined</code>",
<a><code>is</code> value</a> set to null, and <a>node document</a> set to <var>document</var>.

<li><p><a>Enqueue a custom element upgrade reaction</a> given <var>result</var> and
<var>definition</var>.
Expand All @@ -5765,8 +5769,9 @@ given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and opt
<li><p>Set <var>result</var> to a new <a for=/>element</a> that implements <var>interface</var>,
with no attributes, <a for=Element>namespace</a> set to <var>namespace</var>,
<a for=Element>namespace prefix</a> set to <var>prefix</var>, <a for=Element>local name</a> set
to <var>localName</var>, <a>custom element state</a> set to "<code>uncustomized</code>", and
<a>node document</a> set to <var>document</var>.
to <var>localName</var>, <a>custom element state</a> set to "<code>uncustomized</code>",
<a><code>is</code> value</a> set to <var>is</var>, and <a>node document</a> set to
<var>document</var>.

<li><p>If <var>document</var> has a <a lt=concept-document-bc>browsing context</a>, and
<var>namespace</var> is the <a>HTML namespace</a>, and either <var>localName</var> is a
Expand Down
19 changes: 11 additions & 8 deletions dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
<p data-fill-with="logo"><a class="logo" href="https://whatwg.org/"> <img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-dom.svg"> </a> </p>
<hgroup>
<h1 class="p-name no-ref allcaps" id="title">DOM</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-06-01">1 June 2016</time></span></h2>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Living Standard — Last Updated <time class="dt-updated" datetime="2016-06-03">3 June 2016</time></span></h2>
</hgroup>
<div data-fill-with="spec-metadata">
<dl>
Expand Down Expand Up @@ -2730,7 +2730,7 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
</ol>
<p>When invoked with the same argument, and as long as <var>root</var>’s <a data-link-type="dfn" href="#concept-node-document">node document</a>’s <a data-link-type="dfn" href="#concept-document-type">type</a> has not changed, the same <code class="idl"><a data-link-type="idl" href="#htmlcollection">HTMLCollection</a></code> object may be returned as
returned by an earlier call. </p>
<p>The <dfn data-dfn-type="dfn" data-export="" data-lt="list of elements with namespace namespace and local name localName" id="concept-getelementsbytagnamens">list of elements with namespace <var>namespace</var> and local name <var>localName</var><a class="self-link" href="#concept-getelementsbytagnamens"></a></dfn> for a <a data-link-type="dfn" href="#concept-node">node</a> <var>root</var> is the <code class="idl"><a data-link-type="idl" href="#htmlcollection">HTMLCollection</a></code> returned by the following algorithm:</p>
<p>The <dfn data-dfn-type="dfn" data-export="" id="concept-getelementsbytagnamens">list of elements with namespace <var>namespace</var> and local name <var>localName</var><a class="self-link" href="#concept-getelementsbytagnamens"></a></dfn> for a <a data-link-type="dfn" href="#concept-node">node</a> <var>root</var> is the <code class="idl"><a data-link-type="idl" href="#htmlcollection">HTMLCollection</a></code> returned by the following algorithm:</p>
<ol>
<li>If <var>namespace</var> is the empty string, set it to null.
<li>If both <var>namespace</var> and <var>localName</var> are "<code>*</code>" (U+002A), return a <code class="idl"><a data-link-type="idl" href="#htmlcollection">HTMLCollection</a></code> rooted at <var>root</var>, whose filter matches <a data-link-type="dfn" href="#concept-tree-descendant">descendant</a> <a data-link-type="dfn" href="#concept-element">elements</a>.
Expand Down Expand Up @@ -3463,7 +3463,7 @@ <h3 class="heading settled" data-level="4.9" id="interface-element"><span class=
};
</pre>
<p><code class="idl"><a data-link-type="idl" href="#element">Element</a></code> <a data-link-type="dfn" href="#concept-node">nodes</a> are simply known as <dfn data-dfn-type="dfn" data-export="" data-lt="element" id="concept-element">elements<a class="self-link" href="#concept-element"></a></dfn>. </p>
<p><a data-link-type="dfn" href="#concept-element">Elements</a> have an associated <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-namespace">namespace<a class="self-link" href="#concept-element-namespace"></a></dfn>, <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-namespace-prefix">namespace prefix<a class="self-link" href="#concept-element-namespace-prefix"></a></dfn>, <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-local-name">local name<a class="self-link" href="#concept-element-local-name"></a></dfn>, and <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-custom-element-state">custom element state<a class="self-link" href="#concept-element-custom-element-state"></a></dfn>. When an <a data-link-type="dfn" href="#concept-element">element</a> is <a data-link-type="dfn" href="#concept-create-element">created</a>, all of these values are
<p><a data-link-type="dfn" href="#concept-element">Elements</a> have an associated <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-namespace">namespace<a class="self-link" href="#concept-element-namespace"></a></dfn>, <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-namespace-prefix">namespace prefix<a class="self-link" href="#concept-element-namespace-prefix"></a></dfn>, <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-local-name">local name<a class="self-link" href="#concept-element-local-name"></a></dfn>, <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-custom-element-state">custom element state<a class="self-link" href="#concept-element-custom-element-state"></a></dfn>, and <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-is-value"><code>is</code> value<a class="self-link" href="#concept-element-is-value"></a></dfn>. When an <a data-link-type="dfn" href="#concept-element">element</a> is <a data-link-type="dfn" href="#concept-create-element">created</a>, all of these values are
initialized. </p>
<p>An <a data-link-type="dfn" href="#concept-element">element</a>’s <a data-link-type="dfn" href="#concept-element-custom-element-state">custom element state</a> is one of "<code>undefined</code>",
"<code>uncustomized</code>", or "<code>custom</code>". An <a data-link-type="dfn" href="#concept-element">element</a> whose <a data-link-type="dfn" href="#concept-element-custom-element-state">custom element state</a> is "<code>uncustomized</code>" or "<code>custom</code>" is said to be <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-defined">defined<a class="self-link" href="#concept-element-defined"></a></dfn>. An <a data-link-type="dfn" href="#concept-element">element</a> whose <a data-link-type="dfn" href="#concept-element-custom-element-state">custom element state</a> is "<code>custom</code>", is said to be <dfn data-dfn-for="Element" data-dfn-type="dfn" data-export="" id="concept-element-custom">custom<a class="self-link" href="#concept-element-custom"></a></dfn>. </p>
Expand Down Expand Up @@ -3521,7 +3521,7 @@ <h3 class="heading settled" data-level="4.9" id="interface-element"><span class=
<li>
<p>Set <var>result</var> to a new <a data-link-type="dfn" href="#concept-element">element</a> that implements <var>interface</var>,
with no attributes, <a data-link-type="dfn" href="#concept-element-namespace">namespace</a> set to the <a data-link-type="dfn" href="#html-namespace">HTML namespace</a>, <a data-link-type="dfn" href="#concept-element-namespace-prefix">namespace prefix</a> set to <var>prefix</var>, <a data-link-type="dfn" href="#concept-element-local-name">local name</a> set
to <var>localName</var>, <a data-link-type="dfn" href="#concept-element-custom-element-state">custom element state</a> set to "<code>undefined</code>", and <a data-link-type="dfn" href="#concept-node-document">node document</a> set to <var>document</var>. </p>
to <var>localName</var>, <a data-link-type="dfn" href="#concept-element-custom-element-state">custom element state</a> set to "<code>undefined</code>", <a data-link-type="dfn" href="#concept-element-is-value"><code>is</code> value</a> set to <var>is</var>, and <a data-link-type="dfn" href="#concept-node-document">node document</a> set to <var>document</var>. </p>
<li>
<p>If the <var>synchronous custom elements flag</var> is set, <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/scripting.html#concept-upgrade-an-element">upgrade</a> <var>element</var> using <var>definition</var>. </p>
<li>
Expand Down Expand Up @@ -3557,13 +3557,15 @@ <h3 class="heading settled" data-level="4.9" id="interface-element"><span class=
<p>If <var>result</var>’s <a data-link-type="dfn" href="#concept-element-local-name">local name</a> is not equal to <var>localName</var>, then <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw">throw</a> a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notsupportederror">NotSupportedError</a></code>. </p>
<li>
<p>Set <var>result</var>’s <a data-link-type="dfn" href="#concept-element-namespace-prefix">namespace prefix</a> to <var>prefix</var>. </p>
<li>
<p>Set <var>result</var>’s <a data-link-type="dfn" href="#concept-element-is-value"><code>is</code> value</a> to null. </p>
</ol>
<li>
<p>Otherwise: </p>
<ol>
<li>
<p>Set <var>result</var> to a new <a data-link-type="dfn" href="#concept-element">element</a> that implements the <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/dom.html#htmlelement">HTMLElement</a></code> interface, with no attributes, <a data-link-type="dfn" href="#concept-element-namespace">namespace</a> set to the <a data-link-type="dfn" href="#html-namespace">HTML namespace</a>, <a data-link-type="dfn" href="#concept-element-namespace-prefix">namespace prefix</a> set to <var>prefix</var>, <a data-link-type="dfn" href="#concept-element-local-name">local name</a> set
to <var>localName</var>, <a data-link-type="dfn" href="#concept-element-custom-element-state">custom element state</a> set to "<code>undefined</code>", and <a data-link-type="dfn" href="#concept-node-document">node document</a> set to <var>document</var>. </p>
to <var>localName</var>, <a data-link-type="dfn" href="#concept-element-custom-element-state">custom element state</a> set to "<code>undefined</code>", <a data-link-type="dfn" href="#concept-element-is-value"><code>is</code> value</a> set to null, and <a data-link-type="dfn" href="#concept-node-document">node document</a> set to <var>document</var>. </p>
<li>
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/scripting.html#enqueue-a-custom-element-upgrade-reaction">Enqueue a custom element upgrade reaction</a> given <var>result</var> and <var>definition</var>. </p>
</ol>
Expand All @@ -3576,7 +3578,7 @@ <h3 class="heading settled" data-level="4.9" id="interface-element"><span class=
<li>
<p>Set <var>result</var> to a new <a data-link-type="dfn" href="#concept-element">element</a> that implements <var>interface</var>,
with no attributes, <a data-link-type="dfn" href="#concept-element-namespace">namespace</a> set to <var>namespace</var>, <a data-link-type="dfn" href="#concept-element-namespace-prefix">namespace prefix</a> set to <var>prefix</var>, <a data-link-type="dfn" href="#concept-element-local-name">local name</a> set
to <var>localName</var>, <a data-link-type="dfn" href="#concept-element-custom-element-state">custom element state</a> set to "<code>uncustomized</code>", and <a data-link-type="dfn" href="#concept-node-document">node document</a> set to <var>document</var>. </p>
to <var>localName</var>, <a data-link-type="dfn" href="#concept-element-custom-element-state">custom element state</a> set to "<code>uncustomized</code>", <a data-link-type="dfn" href="#concept-element-is-value"><code>is</code> value</a> set to <var>is</var>, and <a data-link-type="dfn" href="#concept-node-document">node document</a> set to <var>document</var>. </p>
<li>
<p>If <var>document</var> has a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-document-bc">browsing context</a>, and <var>namespace</var> is the <a data-link-type="dfn" href="#html-namespace">HTML namespace</a>, and either <var>localName</var> is a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/scripting.html#valid-custom-element-name">valid custom element name</a> or <var>is</var> is is non-null, set <var>result</var>’s <a data-link-type="dfn" href="#concept-element-custom-element-state">custom element state</a> to "<code>undefined</code>". </p>
</ol>
Expand Down Expand Up @@ -5598,7 +5600,6 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
<li><a href="#dom-node-attributes">attribute for Node</a><span>, in §8.2</span>
</ul>
<li><a href="#dom-node-baseuri">baseURI</a><span>, in §4.4</span>
<li><a href="#concept-document-base-url">base URL</a><span>, in §4.5</span>
<li><a href="#concept-range-bp-before">before</a><span>, in §5.2</span>
<li><a href="#dom-childnode-before">before(nodes)</a><span>, in §4.2.8</span>
<li><a href="#dom-childnode-before">before(nodes...)</a><span>, in §4.2.8</span>
Expand Down Expand Up @@ -5957,6 +5958,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
<li><a href="#dom-node-issamenode">isSameNode(otherNode)</a><span>, in §4.4</span>
<li><a href="#dom-node-issupported">isSupported</a><span>, in §8.2</span>
<li><a href="#dom-event-istrusted">isTrusted</a><span>, in §3.2</span>
<li><a href="#concept-element-is-value">is value</a><span>, in §4.9</span>
<li>
item(index)
<ul>
Expand All @@ -5983,7 +5985,8 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
<li><a href="#concept-light-tree">light tree</a><span>, in §4.2.2</span>
<li><a href="#concept-document-limited-quirks">limited-quirks mode</a><span>, in §4.5</span>
<li><a href="#concept-getelementsbyclassname">list of elements with class names classNames</a><span>, in §4.4</span>
<li><a href="#concept-getelementsbytagnamens">list of elements with namespace namespace and local name localName</a><span>, in §4.4</span>
<li><a href="#concept-getelementsbytagnamens">list of elements with namespace
namespace and local name localName</a><span>, in §4.4</span>
<li><a href="#concept-getelementsbytagname">list of elements with qualified name qualifiedName</a><span>, in §4.4</span>
<li><a href="#concept-collection-live">live</a><span>, in §4.2.10</span>
<li><a href="#concept-collection-live">live collection</a><span>, in §4.2.10</span>
Expand Down

0 comments on commit 754bb8d

Please sign in to comment.