Skip to content

Commit 8e754b5

Browse files
authored
Stop defining nodeName in terms of tagName
Fixes #297.
1 parent 510fa87 commit 8e754b5

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

dom.bs

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3717,7 +3717,7 @@ that is a <a>document</a>.
37173717

37183718
<dl>
37193719
<dt>{{Element}}
3720-
<dd>Its {{Element/tagName}} attribute value.
3720+
<dd>Its <a for=Element>HTML-uppercased qualified name</a>.
37213721

37223722
<dt>{{Attr}}
37233723
<dd>Its <a for=Attr>qualified name</a>.
@@ -3804,13 +3804,12 @@ The <dfn attribute for=Node>localName</dfn> attribute
38043804
must return the local name that is associated with the node, if it has one,
38053805
and null otherwise.-->
38063806

3807-
The <dfn attribute for=Node>nodeName</dfn> attribute's getter, when invoked, must return
3808-
the first matching statement, switching on the <a>context object</a>:
3807+
<p>The <dfn attribute for=Node>nodeName</dfn> attribute's getter, when invoked, must return the
3808+
first matching statement, switching on the <a>context object</a>:
38093809

38103810
<dl class=switch>
38113811
<dt>{{Element}}
3812-
<dd>Its {{Element/tagName}} attribute value.
3813-
<!-- XXX internal concept -->
3812+
<dd>Its <a for=Element>HTML-uppercased qualified name</a>.
38143813

38153814
<dt>{{Attr}}
38163815
<dd>Its <a for=Attr>qualified name</a>.
@@ -5820,7 +5819,21 @@ execute correctly the first time, it is not executed again by an
58205819
<a for=Element>namespace prefix</a>, followed by "<code>:</code>", followed by its
58215820
<a for=Element>local name</a>, otherwise.
58225821

5823-
<p class=note>User agents could have this as an internal slot as an optimization.
5822+
<p>An <a for=/>element</a>'s <dfn for=Element>HTML-uppercased qualified name</dfn> is the return
5823+
value of these steps:
5824+
5825+
<ol>
5826+
<li><p>Let <var>qualifiedName</var> be <a>context object</a>'s <a for=Element>qualified name</a>.
5827+
5828+
<li><p>If the <a>context object</a> is in the <a>HTML namespace</a> and its
5829+
<a for=Node>node document</a> is an <a>HTML document</a>, then set <var>qualifiedName</var> to
5830+
<var>qualifiedName</var> in <a>ASCII uppercase</a>.
5831+
5832+
<li>Return <var>qualifiedName</var>.
5833+
</ol>
5834+
5835+
<p class=note>User agents could optimize <a for=Element>qualified name</a> and
5836+
<a for=Element>HTML-uppercased qualified name</a> by storing them in internal slots.
58245837

58255838
<p>To
58265839
<dfn export id=concept-create-element lt="create an element|creating an element">create an element</dfn>,
@@ -6289,8 +6302,7 @@ A <a>node</a>'s
62896302
<a for=Element>local name</a>.
62906303

62916304
<dt><var>qualifiedName</var> = <var>element</var> . {{Element/tagName}}
6292-
<dd>Returns the <a for=Element>qualified name</a>. (The return value is uppercased in an
6293-
<a>HTML document</a>.)
6305+
<dd>Returns the <a for=Element>HTML-uppercased qualified name</a>.
62946306
</dl>
62956307

62966308
<p>The <dfn attribute for=Element><code>namespaceURI</code></dfn> attribute's getter must return
@@ -6302,18 +6314,8 @@ the <a>context object</a>'s <a for=Element>namespace</a>.
63026314
<p>The <dfn attribute for=Element><code>localName</code></dfn> attribute's getter must return the
63036315
<a>context object</a>'s <a for=Element>local name</a>.
63046316

6305-
<p>The <dfn attribute for=Element><code>tagName</code></dfn> attribute's getter must run these
6306-
steps:
6307-
6308-
<ol>
6309-
<li><p>Let <var>qualifiedName</var> be <a>context object</a>'s <a for=Element>qualified name</a>.
6310-
6311-
<li><p>If the <a>context object</a> is in the <a>HTML namespace</a> and its
6312-
<a for=Node>node document</a> is an <a>HTML document</a>, then set <var>qualifiedName</var> to
6313-
<var>qualifiedName</var> in <a>ASCII uppercase</a>.
6314-
6315-
<li>Return <var>qualifiedName</var>.
6316-
</ol>
6317+
<p>The <dfn attribute for=Element><code>tagName</code></dfn> attribute's getter must return the
6318+
<a>context object</a>'s <a for=Element>HTML-uppercased qualified name</a>.
63176319

63186320
<hr>
63196321

0 commit comments

Comments
 (0)