Skip to content

Commit

Permalink
Simplify boolean logic for toggleAttribute()
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanKingston committed Jun 29, 2018
1 parent 32efc48 commit 2325396
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6606,20 +6606,19 @@ method, when invoked, must run these steps:
<p>If <var>attribute</var> is null, then:

<ol>
<li><p>If <var>force</var> is not given or is true, create an <a>attribute</a> whose
<li><p>If <var>force</var> is given and is false, return false.

<li><p>Create 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 the <a>context object</a>'s
<a for=Node>node document</a>, then <a lt="append an attribute">append</a> this <a>attribute</a>
to the <a>context object</a>, and then return true.

<li><p>Return false.
</ol>

<li><p>Otherwise, if <var>force</var> is not given or is false,
<a lt="remove an attribute by name">remove an attribute</a> given <var>qualifiedName</var> and the
<a>context object</a>, and then return false.
<li><p>Otherwise, if <var>force</var> is given and is true, return true.

<li><p>Return true.
<li><p><a lt="remove an attribute by name">Remove an attribute</a> given <var>qualifiedName</var> and the
<a>context object</a>, and then return false.
</ol>

<p>The
Expand Down

0 comments on commit 2325396

Please sign in to comment.