Skip to content

Commit

Permalink
sync changes from #10960
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Feb 2, 2025
1 parent 7d69572 commit 7c44d2b
Showing 1 changed file with 36 additions and 23 deletions.
59 changes: 36 additions & 23 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -53506,20 +53506,20 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
data-x="invalid value default">invalid value default</i> are both the <span
data-x="attr-button-type-submit-state">Submit Button</span> state.</p>

<p>If the <code data-x="attr-button-type">type</code> attribute is in the <span
data-x="attr-button-type-submit-state">Submit Button</span> state, and the <code
data-x="attr-button-type">type</code>, <code data-x="attr-button-command">command</code>, and
<code data-x="attr-button-commandfor">commandfor</code> content attributes are not present, then
the element is specifically a <span data-x="concept-submit-button">submit button</span>.</p>
<p>An element is said to be a <span data-x="concept-submit-button">submit button</span> if any of
the following are true:</p>

<p>If the <code data-x="attr-button-type">type</code> content attribute is present and in the
<span data-x="attr-button-type-submit-state">Submit Button</span> state, then the element is
specifically a <span data-x="concept-submit-button">submit button</span>.</p>
<ul>
<li><p>The <code data-x="attr-button-type">type</code> attribute is in the <span
data-x="attr-button-type-submit-state">Submit Button</span> state; or</p></li>

<p><strong>Constraint validation</strong>: If the <code data-x="attr-button-type">type</code>
attribute is in the <span data-x="attr-button-type-reset-state">Reset Button</span> state or the
<span data-x="attr-button-type-button-state">Button</span> state, the element is <span>barred from
constraint validation</span>.</p>
<li><p>The <code data-x="attr-button-type">type</code> content attribute is present, and in the
<span data-x="attr-button-type-submit-state">Submit Button</span> state.</p></li>
</ul>

<p><strong>Constraint validation</strong>: If the element is not a <span
data-x="concept-submit-button">submit button</span>, the element is <span>barred from constraint
validation</span>.</p>

<p>If specified, the <dfn element-attr for="button"><code
data-x="attr-button-commandfor">commandfor</code></dfn> attribute value must be the <span
Expand Down Expand Up @@ -53590,12 +53590,13 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {

<li>
<p>If <var>element</var> is a <span data-x="concept-submit-button">submit button</span>:</p>

<ol>

<li><p>If <var>element</var> has a <span>form owner</span> then <span
data-x="concept-form-submit">submit</span> <var>element</var>'s <span>form owner</span> from
<var>element</var> with <i data-x="submit-user-involvement">userInvolvement</i> set to
<var>event</var>'s <span data-x="event-uni">user navigation involvement</span>.</p></li>
data-x="concept-form-submit">Submit</span> <var>element</var>'s <span>form
owner</span> from <var>element</var> with <i
data-x="submit-user-involvement">userInvolvement</i> set to <var>event</var>'s <span
data-x="event-uni">user navigation involvement</span>.</p></li>

<li><p>Return.</p></li>
</ol>
Expand All @@ -53606,7 +53607,7 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
data-x="attr-button-type-reset-state">Reset Button</span> state:</p>

<ol>
<li><p>If <var>element</var> has a <span>form owner</span> then <span
<li><p>If <var>element</var> has a <span>form owner</span>, then <span
data-x="concept-form-reset">Reset</span> <var>element</var>'s <span>form owner</span>.</p></li>

<li><p>Return.</p></li>
Expand Down Expand Up @@ -53740,9 +53741,8 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
data-x="attr-fs-formenctype">formenctype</code>, <code
data-x="attr-fs-formmethod">formmethod</code>, <code
data-x="attr-fs-formnovalidate">formnovalidate</code>, and <code
data-x="attr-fs-formtarget">formtarget</code> must not be specified if the element's <code
data-x="attr-button-type">type</code> attribute is not in the <span
data-x="attr-button-type-submit-state">Submit Button</span> state.</p>
data-x="attr-fs-formtarget">formtarget</code> must not be specified if the element is not a <code
data-x="concept-submit-button">submit button</code>.</p>

<p>The <dfn attribute for="HTMLButtonElement"><code
data-x="dom-button-commandForElement">commandForElement</code></dfn> IDL attribute must
Expand Down Expand Up @@ -53802,9 +53802,22 @@ 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>

<ol>
<li><p>If <span>this</span> is a <span data-x="concept-submit-button">submit button</span>, then
return "<code data-x="">submit</code>".</p></li>

<li><p>If <span>this</span>'s <span data-x="attr-button-type">type</span> attribute is in the
<span data-x="attr-button-type-reset-state">Reset</span> state, then return "<code
data-x="">reset</code>".</p></li>

<li><p>Return "<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 7c44d2b

Please sign in to comment.