Skip to content

Commit

Permalink
Stop dispatching invalid on <form>
Browse files Browse the repository at this point in the history
Also tidy up some formatting.

Tests: web-platform-tests/wpt#23380.

Closes whatwg#4626.
  • Loading branch information
annevk authored May 4, 2020
1 parent 2ecceea commit caebee3
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -41724,9 +41724,9 @@ interface <dfn>HTMLTableCellElement</dfn> : <span>HTMLElement</span> {
&lt;/form></code></pre>

<p class="note">When a form is submitted, <code data-x="event-invalid">invalid</code> events are
fired at each form control that is invalid, and then at the <code>form</code> element itself. This
can be useful for displaying a summary of the problems with the form, since typically the browser
itself will only report one problem at a time.</p>
fired at each form control that is invalid. This can be useful for displaying a summary of the
problems with the form, since typically the browser itself will only report one problem at a
time.</p>



Expand Down Expand Up @@ -55153,9 +55153,6 @@ fur
then:</p>

<ol>
<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
data-x="event-invalid">invalid</code> at the <var>form</var> element.</p></li>

<li><p>Set <var>form</var>'s <span>firing submission events</span> to false.</p></li>

<li><p>Return.</p></li>
Expand Down Expand Up @@ -66585,22 +66582,21 @@ dictionary <dfn>ValidityStateFlags</dfn> {

<dt><var>valid</var> = <var>internals</var> .
<code data-x="dom-ElementInternals-checkValidity">checkValidity()</code></dt>
<dd><p>Returns true if <var>internals</var>'s
<span data-x="internals-target">target element</span> has no validity problems; false otherwise.
Fires an <code data-x="event-invalid">invalid</code> event at the element in the latter case.
</p></dd>
<dd><p>Returns true if <var>internals</var>'s <span data-x="internals-target">target
element</span> has no validity problems; false otherwise. Fires an <code
data-x="event-invalid">invalid</code> event at the element in the latter case.</p></dd>

<dt><var>valid</var> = <var>internals</var> .
<code data-x="dom-ElementInternals-reportValidity">reportValidity()</code></dt>
<dd><p>Returns true if <var>internals</var>'s
<span data-x="internals-target">target element</span> has no validity problems; otherwise,
returns false, fires an <code data-x="event-invalid">invalid</code> event at the element, and
(if the event isn't canceled) reports the problem to the user.</p></dd>
<dd><p>Returns true if <var>internals</var>'s <span data-x="internals-target">target
element</span> has no validity problems; otherwise, returns false, fires an <code
data-x="event-invalid">invalid</code> event at the element, and (if the event isn't canceled)
reports the problem to the user.</p></dd>

<dt><var>internals</var> . <code data-x="dom-ElementInternals-labels">labels</code></dt>
<dd><p>Returns a <code>NodeList</code> of all the <code>label</code> elements that
<var>internals</var>'s <span data-x="internals-target">target element</span> is associated with.
</p></dd>
<var>internals</var>'s <span data-x="internals-target">target element</span> is associated
with.</p></dd>
</dl>

<p>Each <code>ElementInternals</code> has a <dfn data-x="internals-target">target element</dfn>,
Expand Down Expand Up @@ -119923,7 +119919,7 @@ INSERT INTERFACES HERE
<tr> <!-- invalid -->
<td> <dfn data-dfn-type="event" data-dfn-for="HTMLElement" data-export=""><code data-x="event-invalid">invalid</code></dfn>
<td> <code>Event</code>
<td> Form controls, <code>form</code> elements
<td> Form controls
<td> Fired at controls during form validation if they do not satisfy their constraints

<tr> <!-- languagechange -->
Expand Down Expand Up @@ -121302,6 +121298,7 @@ INSERT INTERFACES HERE
Jonathan Watt,
Jonathan Worent,
Jonny Axelsson,
Joram Schrijver,
Jordan Tucker,
Jorgen Horstink,
Joris van der Wel,
Expand Down

0 comments on commit caebee3

Please sign in to comment.