Skip to content

Commit

Permalink
Throw InvalidStateError if the attribute being modified is modified b…
Browse files Browse the repository at this point in the history
…y the default TT policy.
  • Loading branch information
lukewarlow committed Apr 11, 2024
1 parent ac5b4aa commit 524d8cd
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6353,16 +6353,21 @@ given a <var>document</var>, <var>localName</var>, <var>namespace</var>, and opt
</ol>

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

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

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

<li><p><a>Handle attribute changes</a> for <var>attribute</var> with <var>attribute</var>'s
<a for=Attr>element</a>, <var>oldValue</var>, and <var>value</var>.
<li><p>If <var>attribute</var>'s <a for=Attr>element</a> <a lt="has an attribute">has</a>
an <a>attribute</a> <var>attribute</var>, then <a>handle attribute changes</a> for
<var>attribute</var> with <var>attribute</var>'s <a for=Attr>element</a>, <var>oldValue</var>, and
<var>value</var>.

<li><p>Otherwise, throw an "{{InvalidStateError!!exception}}" {{DOMException}}.
</ol>

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

<li><p>If <var>element</var> <a lt="has an attribute">has</a> an <a>attribute</a>
<var>attribute</var>, then throw an "{{InvalidStateError!!exception}}" {{DOMException}}.

<li><p><a for=list>Append</a> <var>attribute</var> to <var>element</var>'s
<a for=Element>attribute list</a>.

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

<li><p><a lt="replace an attribute">Replace</a> <var>oldAttr</var> with <var>attr</var>.
<li><p>If <var>element</var> <a lt="has an attribute">has</a> an <a>attribute</a>
<var>attr</var>, then <a lt="replace an attribute">replace</a> <var>oldAttr</var> with
<var>attr</var>.

<li><p>Otherwise, throw an "{{InvalidStateError!!exception}}" {{DOMException}}.
</ul>

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

0 comments on commit 524d8cd

Please sign in to comment.