Skip to content

Commit 524d8cd

Browse files
committed
Throw InvalidStateError if the attribute being modified is modified by the default TT policy.
1 parent ac5b4aa commit 524d8cd

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

dom.bs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6353,16 +6353,21 @@ given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and opt
63536353
</ol>
63546354

63556355
<p>To <dfn export id=concept-element-attributes-change lt="change an attribute">change</dfn> an
6356-
<a>attribute</a> <var>attribute</var> to <var>value</var>, with string <var>sink</var>, run these steps:
6356+
<a>attribute</a> <var>attribute</var> to <var>value</var>, with string <var>sink</var>, run these
6357+
steps:
63576358

63586359
<ol>
63596360
<li><p>Let <var>oldValue</var> be <var>attribute</var>'s <a for=Attr>value</a>.</p></li>
63606361

63616362
<li><p><a>Validate and set attribute value</a> <var>value</var> for <var>attribute</var>, with
63626363
<var>attribute</var>'s <a for=Attr>element</a>, and <var>sink</var>.
63636364

6364-
<li><p><a>Handle attribute changes</a> for <var>attribute</var> with <var>attribute</var>'s
6365-
<a for=Attr>element</a>, <var>oldValue</var>, and <var>value</var>.
6365+
<li><p>If <var>attribute</var>'s <a for=Attr>element</a> <a lt="has an attribute">has</a>
6366+
an <a>attribute</a> <var>attribute</var>, then <a>handle attribute changes</a> for
6367+
<var>attribute</var> with <var>attribute</var>'s <a for=Attr>element</a>, <var>oldValue</var>, and
6368+
<var>value</var>.
6369+
6370+
<li><p>Otherwise, throw an "{{InvalidStateError!!exception}}" {{DOMException}}.
63666371
</ol>
63676372

63686373
<p>To <dfn export id=concept-element-attributes-append lt="append an attribute">append</dfn> an
@@ -6374,6 +6379,9 @@ string <var>sink</var> (default ""), run these steps:
63746379
<var>attribute</var>'s <a for="Attr">value</a> for <var>attribute</var> with <var>element</var>,
63756380
and <var>sink</var>.
63766381

6382+
<li><p>If <var>element</var> <a lt="has an attribute">has</a> an <a>attribute</a>
6383+
<var>attribute</var>, then throw an "{{InvalidStateError!!exception}}" {{DOMException}}.
6384+
63776385
<li><p><a for=list>Append</a> <var>attribute</var> to <var>element</var>'s
63786386
<a for=Element>attribute list</a>.
63796387

@@ -6497,7 +6505,11 @@ and a string <var>sink</var>:
64976505
<li><p><a>Validate and set attribute value</a> <var>attr</var>'s <a for="Attr">value</a> for
64986506
<var>attr</var> with <var>element</var>, and <var>sink</var>.
64996507

6500-
<li><p><a lt="replace an attribute">Replace</a> <var>oldAttr</var> with <var>attr</var>.
6508+
<li><p>If <var>element</var> <a lt="has an attribute">has</a> an <a>attribute</a>
6509+
<var>attr</var>, then <a lt="replace an attribute">replace</a> <var>oldAttr</var> with
6510+
<var>attr</var>.
6511+
6512+
<li><p>Otherwise, throw an "{{InvalidStateError!!exception}}" {{DOMException}}.
65016513
</ul>
65026514

65036515
<li><p>Otherwise, <a lt="append an attribute">append</a> <var>attr</var> to <var>element</var>

0 commit comments

Comments
 (0)