Skip to content

Commit

Permalink
expand type getter steps to ensure "submit" is only returned for vali…
Browse files Browse the repository at this point in the history
…d submit buttons
  • Loading branch information
keithamus committed Nov 10, 2024
1 parent 37b8ed3 commit 87d9efb
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -53750,9 +53750,31 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
<p>The <dfn attribute for="HTMLButtonElement"><code data-x="dom-button-value">value</code></dfn>
IDL attribute must <span>reflect</span> the content attribute of the same name.</p>

<p>The <dfn attribute for="HTMLButtonElement"><code data-x="dom-button-type">type</code></dfn> IDL
attribute must <span>reflect</span> the content attribute of the same name, <span>limited to only
known values</span>.</p>
<p>The <dfn attribute for="HTMLButtonElement"><code data-x="dom-button-type">type</code></dfn>
getter steps are:</p>


<p>The <dfn attribute for="HTMLButtonElement"><code data-x="dom-button-type">type</code></dfn>
getter steps are:</p>

<ol>
<li><p>Let <var>type</var> be <span>this</span>'s <span
data-x="attr-button-type">type</span> attribute.</p><li>

<li><p>If <var>type</var> is in the <span
data-x="attr-button-type-submit-state">Submit</span> state, and <span>this</span> is a <span
data-x="concept-submit-button">submit button</span>, return the string
"<code data-x="">submit</code>".</p></li>

<li><p>If <var>type</var> is in the <span
data-x="attr-button-type-reset-state">Reset</span> state, return the string
"<code data-x="">reset</code>".</p></li>

<li><p>Return the string "<code data-x="">button</code>".</p></li>
</ol>

<p>The <code data-x="dom-button-type">type</code> setter steps are to set the <code
data-x="attr-button-type">type</code> content attribute to the given value.</p>

<p>The <code data-x="dom-cva-willValidate">willValidate</code>, <code
data-x="dom-cva-validity">validity</code>, and <code
Expand Down

0 comments on commit 87d9efb

Please sign in to comment.