Skip to content

Commit

Permalink
Revert "Update enforcement for toggleAttribute to match behaviour obs…
Browse files Browse the repository at this point in the history
…erved in Chrome."

This reverts commit 2f00466.
  • Loading branch information
lukewarlow committed Aug 13, 2024
1 parent 9b74d93 commit d836a23
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6971,29 +6971,19 @@ method steps are:
<p>If <var>attribute</var> is null, then:

<ol>
<li><p>If <var>force</var> is false, return false.

<li><p>Set <var>attribute</var> to an <a>attribute</a> whose
<a for=Attr>local name</a> is <var>qualifiedName</var>, <a for=Attr>value</a> is the empty
string, and <a for=Node>node document</a> is <a>this</a>'s <a for=Node>node document</a>.

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

<li><p>Let <var>existingAttribute</var> be the first <a>attribute</a> in <a>this</a>'s
<a for=Element>attribute list</a> whose <a for=Attr>qualified name</a> is <var>qualifiedName</var>,
and null otherwise.

<li><p>If <var>existingAttribute</var> is null:
<ol>
<li><p>Set <var>attribute</var>'s <a for=Attr>value</a> to <var>verifiedValue</var>.

<li><p><a lt="append an attribute">Append</a> <var>attribute</var> to <a>this</a>.
<li><p>Set <var>attribute</var>'s <a for=Attr>value</a> to <var>verifiedValue</var>.

<li><p>Return true.
</ol>
<li><p>If <var>force</var> is not given or is true, then <a lt="append an attribute">append</a>
this <a>attribute</a> to <a>this</a>, and then return true.

<li><p>Set <var>existingAttribute</var>'s <a for=Attr>value</a> to <var>verifiedValue</var>.
<li><p>Return false.
</ol>

<li><p>Otherwise, if <var>force</var> is not given or is false,
Expand Down

0 comments on commit d836a23

Please sign in to comment.