W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2011

[whatwg] questions regarding submit event timing

From: Hallvord R M Steen <hallvors@gmail.com>
Date: Mon, 2 May 2011 10:14:17 +0900
Message-ID: <BANLkTi=2egZS7RmJG8ds0VEjczaUTwVZwQ@mail.gmail.com>
Some questions related to possibly clarifying this section:

1) What methods exactly cause the "scripted submit" flag to be set?
It's obviously set if you call form.submit(), but will it be set in
these two cases:

HTML: <form><input type="submit"></form>
JS: form.elements[0].click()

HTML: <form><input type="submit"></form>
JS: form.elements[0].dispatchEvent( evt ) /* where evt is a 'click'
event object  */

I believe the answer should be yes in both cases but I'm not sure if
it's clear from the spec.

2) Is the event fired synchronously? (And is it fired synchronously
for all three cases of scripted submits mentioned above?)
Again, I think the answer is yes but I couldn't find this information
in the spec when looking for it.

Hallvord R. M. Steen
Received on Sunday, 1 May 2011 18:14:17 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:32 UTC