@@ -4229,7 +4229,9 @@ dom-Range-extractContents, dom-Range-cloneContents -->
4229
4229
<ol>
4230
4230
<li><p> Let <var> copyAttribute</var> be a <a>clone</a> of <var> attribute</var> .
4231
4231
4232
- <li><p> <a lt="append an attribute">Append</a> <var> copyAttribute</var> to <var> copy</var> .
4232
+ <li>
4233
+ <p> <a lt="append an attribute">Append</a> <var> copyAttribute</var> to <var> copy</var>
4234
+ with <var> copyAttribute</var> 's <a for="Attr">value</a> .
4233
4235
</ol>
4234
4236
</li>
4235
4237
</ol>
@@ -6100,10 +6102,20 @@ its <a for=Element>attribute list</a> <a for=list>is empty</a>.
6100
6102
<a for=/>elements</a> . The algorithm is passed <var> element</var> , <var> localName</var> ,
6101
6103
<var> oldValue</var> , <var> value</var> , and <var> namespace</var> .
6102
6104
6105
+ <p> This and <a lt="other applicable specifications">other specifications</a> may define
6106
+ <dfn export id=concept-element-attributes-validation-ext>attribute validation steps</dfn> for
6107
+ <a for=/>elements</a> . The algorithm is passed <var> element</var> , <var> localName</var> ,
6108
+ <var> value</var> , and <var> namespace</var> .
6109
+
6103
6110
<p> To <dfn noexport>handle attribute changes</dfn> for an <a>attribute</a> <var> attribute</var> with
6104
6111
<var> element</var> , <var> oldValue</var> , and <var> newValue</var> , run these steps:
6105
6112
6106
6113
<ol>
6114
+ <li><p> Run the <a>attribute validation steps</a> with <var> element</var> ,
6115
+ <var> attribute</var> 's <a for=Attr>local name</a> , <var> newValue</var> and
6116
+ <var> attribute</var> 's <a for=Attr>namespace</a> . If this throws an exception, then
6117
+ rethrow the exception and abort further steps.
6118
+
6107
6119
<li><p> <a>Queue a mutation record</a> of "<code> attributes</code> " for <var> element</var> with
6108
6120
<var> attribute</var> 's <a for=Attr>local name</a>, <var>attribute</var>' s
6109
6121
<a for=Attr>namespace</a> , <var> oldValue</var> , « », « », null, and null.
@@ -6130,12 +6142,14 @@ its <a for=Element>attribute list</a> <a for=list>is empty</a>.
6130
6142
</ol>
6131
6143
6132
6144
<p> To <dfn export id=concept-element-attributes-append lt="append an attribute">append</dfn> an
6133
- <a>attribute</a> <var> attribute</var> to an <a for="/">element</a> <var> element</var> , run these
6134
- steps:
6145
+ <a>attribute</a> <var> attribute</var> to an <a for="/">element</a> <var> element</var>
6146
+ with a <var> value </var> , run these steps:
6135
6147
6136
6148
<ol>
6137
6149
<li><p> <a>Handle attribute changes</a> for <var> attribute</var> with <var> element</var> , null, and
6138
- <var> attribute</var> 's <a for=Attr>value</a> .
6150
+ <var> value</var> .
6151
+
6152
+ <li><p> Set <var> attribute</var> 's <a for=Attr>value</a> to <var> value</var> .
6139
6153
6140
6154
<li><p> <a for=list>Append</a> <var> attribute</var> to <var> element</var> 's
6141
6155
<a for=Element>attribute list</a> .
@@ -6234,7 +6248,8 @@ run these steps:
6234
6248
<li><p> If <var> oldAttr</var> is non-null, then <a lt="replace an attribute">replace</a>
6235
6249
<var> oldAttr</var> with <var> attr</var> .
6236
6250
6237
- <li><p> Otherwise, <a lt="append an attribute">append</a> <var> attr</var> to <var> element</var> .
6251
+ <li><p> Otherwise, <a lt="append an attribute">append</a> <var> attr</var> to <var> element</var>
6252
+ with <var> attr</var> 's <a for="Attr">value</a> .
6238
6253
6239
6254
<li><p> Return <var> oldAttr</var> .
6240
6255
</ol>
@@ -6254,10 +6269,9 @@ optional <var>prefix</var>, and <var>namespace</var>, run these steps:
6254
6269
6255
6270
<li> If <var> attribute</var> is null, create an <a>attribute</a> whose <a for=Attr>namespace</a> is
6256
6271
<var> namespace</var> , <a for=Attr>namespace prefix</a> is <var> prefix</var> ,
6257
- <a for=Attr>local name</a> is <var> localName</var> , <a for=Attr>value</a> is <var> value</var> , and
6258
- <a for=Node>node document</a> is <var> element</var> 's <a for=Node>node document</a> , then
6259
- <a lt="append an attribute">append</a> this <a>attribute</a> to <var> element</var> , and then
6260
- return.
6272
+ <a for=Attr>local name</a> is <var> localName</var> and <a for=Node>node document</a> is
6273
+ <var> element</var> 's <a for=Node>node document</a> , then <a lt="append an attribute">append</a>
6274
+ this <a>attribute</a> to <var> element</var> with <var> value</var> , and then return.
6261
6275
6262
6276
<li><p> <a lt="change an attribute">Change</a> <var> attribute</var> to <var> value</var> .
6263
6277
</ol>
@@ -6520,10 +6534,9 @@ method, when invoked, must run these steps:
6520
6534
<!-- This is step 2 of "get an attribute by name", modified as appropriate -->
6521
6535
6522
6536
<li><p> If <var> attribute</var> is null, create an <a>attribute</a> whose
6523
- <a for="Attr">local name</a> is <var> qualifiedName</var> , <a for=Attr>value</a> is
6524
- <var> value</var> , and <a for=Node>node document</a> is <a>context object</a> 's
6525
- <a for=Node>node document</a> , then <a lt="append an attribute">append</a> this <a>attribute</a> to
6526
- <a>context object</a> , and then return.
6537
+ <a for="Attr">local name</a> is <var> qualifiedName</var> and <a for=Node>node document</a>
6538
+ is <a>context object</a> 's <a for=Node>node document</a> , then <a lt="append an attribute">append</a>
6539
+ this <a>attribute</a> to <a>context object</a> with <var> value</var> and then return.
6527
6540
6528
6541
<li><p> <a lt="change an attribute">Change</a> <var> attribute</var> to <var> value</var> .
6529
6542
</ol>
@@ -6585,10 +6598,9 @@ method, when invoked, must run these steps:
6585
6598
6586
6599
<ol>
6587
6600
<li><p> If <var> force</var> is not given or is true, create an <a>attribute</a> whose
6588
- <a for="Attr">local name</a> is <var> qualifiedName</var> , <a for=Attr>value</a> is the empty
6589
- string, and <a for=Node>node document</a> is the <a>context object</a> 's
6590
- <a for=Node>node document</a> , then <a lt="append an attribute">append</a> this <a>attribute</a>
6591
- to the <a>context object</a> , and then return true.
6601
+ <a for="Attr">local name</a> is <var> qualifiedName</var> and <a for=Node>node document</a>
6602
+ is the <a>context object</a> 's <a for=Node>node document</a> , then <a lt="append an attribute">append</a>
6603
+ this <a>attribute</a> to the <a>context object</a> with an empty string, and then return true.
6592
6604
6593
6605
<li><p> Return false.
6594
6606
</ol>
0 commit comments