Skip to content

Commit

Permalink
Add verify flag to set an attribute value that is default false and t…
Browse files Browse the repository at this point in the history
…rue from setAttributeNS to fix issue with current spec
  • Loading branch information
lukewarlow committed Jun 13, 2024
1 parent 03384b2 commit 1ec907b
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6546,8 +6546,9 @@ string <var>namespace</var> (default null):</p>
<div algorithm>
<p>To <dfn export id=concept-element-attributes-set-value>set an attribute value</dfn> given an
<a for=/>element</a> <var>element</var>, a string <var>localName</var>, a string or {{TrustedType}}
<var>value</var>, an optional null or string <var>prefix</var> (default null), and an optional null
or string <var>namespace</var> (default null):
<var>value</var>, an optional null or string <var>prefix</var> (default null), an optional null
or string <var>namespace</var> (default null), and an optional boolean <var>verify</var>
(default false):

<ol>
<li>Let <var>attribute</var> be the result of
Expand All @@ -6562,11 +6563,17 @@ or string <var>namespace</var> (default null):
<var>value</var>, and <a for=Node>node document</a> is <var>element</var>'s <a for=Node>node
document</a>.

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

<li><p>If <var>verify</var> is true:
<ol>
<li><p>Set <var>verifiedValue</var> to the result of calling <a>verify attribute value</a>
<var>value</var> for <var>attribute</var>, with <var>element</var>.

<li><p>Set <var>attributeExists</var> to true if <var>element</var> <a lt="has an attribute">has
an attribute</a> <var>attribute</var>; otherwise false.
<li><p>Set <var>attributeExists</var> to true if <var>element</var> <a lt="has an attribute">has
an attribute</a> <var>attribute</var>; otherwise false.
</ol>
</li>

<li><p>If <var>attributeExists</var> is true, <a lt="change an attribute">change</a>
<var>attribute</var> to <var>verifiedValue</var>.
Expand Down Expand Up @@ -6872,7 +6879,7 @@ method steps are:
passing <var>namespace</var> and <var>qualifiedName</var> to <a>validate and extract</a>.

<li><p><a>Set an attribute value</a> for <a>this</a> using <var>localName</var>, <var>value</var>,
and also <var>prefix</var> and <var>namespace</var>.
<var>prefix</var>, <var>namespace</var> and true.
</ol>

<p>The
Expand Down

0 comments on commit 1ec907b

Please sign in to comment.