Skip to content

Commit

Permalink
Update set an attribute to verify attribute value as first step
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewarlow committed Feb 20, 2025
1 parent fdb686b commit b047352
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6651,6 +6651,9 @@ string <var>namespace</var> (default null):</p>
<a for=/>attribute</a> <var>attr</var> and an <a for=/>element</a> <var>element</var>:

<ol>
<li><p>Let <var>verifiedValue</var> be the result of calling <a>verify attribute value</a>
<var>attr</var>'s <a for=Attr>value</a> for <var>attr</var>, with <var>element</var>.

<li><p>If <var>attr</var>'s <a for=Attr>element</a> is neither null nor <var>element</var>,
<a>throw</a> an "{{InUseAttributeError!!exception}}" {{DOMException}}.

Expand All @@ -6661,19 +6664,13 @@ string <var>namespace</var> (default null):</p>

<li><p>If <var>oldAttr</var> is <var>attr</var>, return <var>attr</var>.

<li><p>Let <var>verifiedValue</var> be the result of calling <a>verify attribute value</a>
<var>attr</var>'s <a for=Attr>value</a> for <var>attr</var>, with <var>element</var>.

<li><p>Set <var>attr</var>'s <a for=Attr>value</a> to <var>verifiedValue</var>.

<li><p>If <var>attr</var>'s <a for=Attr>element</a> is neither null nor <var>element</var>,
<a>throw</a> an "{{InUseAttributeError!!exception}}" {{DOMException}}.

<li><p>If <var>oldAttr</var> is non-null, then <a lt="replace an attribute">replace</a>
<var>oldAttr</var> with <var>attr</var>.

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

<li><p>Set <var>attr</var>'s <a for=Attr>value</a> to <var>verifiedValue</var>.

<li><p>Return <var>oldAttr</var>.
</ol>
</div>
Expand Down

0 comments on commit b047352

Please sign in to comment.