Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms: Introduce SubmitEvent for 'submit' event #4984

Merged
merged 7 commits into from
Oct 31, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -56327,7 +56327,9 @@ fur
</li>

<li><p>Let <var>continue</var> be the result of <span data-x="concept-event-fire">firing an
event</span> named <code data-x="event-submit">submit</code> at <var>form</var>, with the <code
event</span> named <code data-x="event-submit">submit</code> at <var>form</var> using
<code>SubmitEvent</code>, with the <code data-x="dom-SubmitEvent-submitter">submitter</code>
attribute initialized to <var>submitter</var>, the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true and the <code
tkent-google marked this conversation as resolved.
Show resolved Hide resolved
data-x="dom-Event-cancelable">cancelable</code> attribute initialized to true.</p></li>

Expand Down Expand Up @@ -57088,6 +57090,38 @@ fur
not reliably interpretable by computer, as the format is ambiguous (for example, there is no way
to distinguish a literal newline in a value from the newline at the end of the value).</p>

<h5>The <code>SubmitEvent</code> interface</h5>

<pre><code class="idl" data-x="">[Exposed=Window,
Constructor(DOMString type, optional <span>SubmitEventInit</span> eventInitDict = {})]
tkent-google marked this conversation as resolved.
Show resolved Hide resolved
interface <dfn>SubmitEvent</dfn> : <span>Event</span> {
readonly attribute <span>HTMLElement</span> <span data-x="dom-SubmitEvent-submitter">submitter</span>;
};

dictionary <dfn>SubmitEventInit</dfn> : <span>EventInit</span> {
required <span>HTMLElement</span> submitter;
};</code></pre>

<dl class="domintro">

tkent-google marked this conversation as resolved.
Show resolved Hide resolved
<dt><var>event</var> . <code data-x="dom-SubmitEvent-submitter">submitter</code></dt>

<dd>

<p>Returns an <code>HTMLElement</code> object representing a submit button triggered the current form
submission, or a <code>form</code> element to be submitted.</p>

</dd>

</dl>

<div w-nodev>

<p>The <dfn><code data-x="dom-SubmitEvent-submitter">submitter</code></dfn> attribute must return
the value it was initialized to.</p>

</div>

<h5>The <code>FormDataEvent</code> interface</h5>

<pre><code class="idl" data-x="">[Exposed=Window,
Expand Down