You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: dom.bs
+20-22
Original file line number
Diff line number
Diff line change
@@ -6189,6 +6189,24 @@ in an <a for="/">element</a> <var>element</var>, run these steps:
6189
6189
6190
6190
<hr>
6191
6191
6192
+
To <dfn export id=concept-element-attributes-get-valid-by-name>get a valid attribute by name</dfn>
6193
+
given a <var>qualifiedName</var>, and <a for="/">element</a><var>element</var>, run these steps:
6194
+
6195
+
<ol>
6196
+
<li><p>If <var>qualifiedName</var> does not match the <code><a type>Name</a></code> production in
6197
+
XML, then <a>throw</a> an "{{InvalidCharacterError!!exception}}" {{DOMException}}.
6198
+
6199
+
<li><p>If <var>element</var> is in the <a>HTML namespace</a> and its <a for=Node>node document</a>
6200
+
is an <a>HTML document</a>, then set <var>qualifiedName</var> to <var>qualifiedName</var> in
6201
+
<a>ASCII lowercase</a>.
6202
+
6203
+
<!-- This is step 2 of "get an attribute by name", modified as appropriate -->
6204
+
<li><p>Let <var>attribute</var> be the first <a>attribute</a> in <var>element</var>'s <a for=Element>attribute list</a>
6205
+
whose <a for=Attr>qualified name</a> is <var>qualifiedName</var>, and null otherwise.
6206
+
6207
+
<li>Return <var>qualifiedName</var>, and <var>attribute</var>.
6208
+
</ol>
6209
+
6192
6210
To <dfn export id=concept-element-attributes-get-by-name>get an attribute by name</dfn> given a
6193
6211
<var>qualifiedName</var> and <a for="/">element</a><var>element</var>, run these steps:
6194
6212
@@ -6528,17 +6546,7 @@ method, when invoked, must these steps:
6528
6546
method, when invoked, must run these steps:
6529
6547
6530
6548
<ol>
6531
-
<li><p>If <var>qualifiedName</var> does not match the <code><a type>Name</a></code> production in
6532
-
XML, then <a>throw</a> an "{{InvalidCharacterError!!exception}}" {{DOMException}}.
6533
-
6534
-
<li><p>If the <a>context object</a> is in the <a>HTML namespace</a> and its
6535
-
<a for=Node>node document</a> is an <a>HTML document</a>, then set <var>qualifiedName</var> to
6536
-
<var>qualifiedName</var> in <a>ASCII lowercase</a>.
6537
-
6538
-
<li><p>Let <var>attribute</var> be the first <a>attribute</a> in <a>context object</a>'s
6539
-
<a for=Element>attribute list</a> whose <a for=Attr>qualified name</a> is <var>qualifiedName</var>,
6540
-
and null otherwise.
6541
-
<!-- This is step 2 of "get an attribute by name", modified as appropriate -->
6549
+
<li><p>Let <var>qualifiedName</var> and <var>attribute</var> be the result of running <a>get a valid attribute by name</a> given the <var>qualifiedName</var> and <a>context object</a>
6542
6550
6543
6551
<li><p>If <var>attribute</var> is null, create an <a>attribute</a> whose
6544
6552
<a for="Attr">local name</a> is <var>qualifiedName</var>, <a for=Attr>value</a> is
@@ -6590,17 +6598,7 @@ when invoked, must run these steps:
6590
6598
method, when invoked, must run these steps:
6591
6599
6592
6600
<ol>
6593
-
<li><p>If <var>qualifiedName</var> does not match the <code><a type>Name</a></code> production in
6594
-
XML, then <a>throw</a> an "{{InvalidCharacterError!!exception}}" {{DOMException}}.
6595
-
6596
-
<li><p>If the <a>context object</a> is in the <a>HTML namespace</a> and its
6597
-
<a for=Node>node document</a> is an <a>HTML document</a>, then set <var>qualifiedName</var> to
6598
-
<var>qualifiedName</var> in <a>ASCII lowercase</a>.
6599
-
6600
-
<li><p>Let <var>attribute</var> be the first <a>attribute</a> in the <a>context object</a>'s
6601
-
<a for=Element>attribute list</a> whose <a for=Attr>qualified name</a> is <var>qualifiedName</var>,
6602
-
and null otherwise.
6603
-
<!-- This is step 2 of "get an attribute by name", modified as appropriate -->
6601
+
<li><p>Let <var>qualifiedName</var> and <var>attribute</var> be the result of running <a>get a valid attribute by name</a> given the <var>qualifiedName</var> and <a>context object</a>
0 commit comments