[whatwg] questions regarding submit event timing

Hallvord R M Steen hallvors at gmail.com
Sun May 1 18:14:17 PDT 2011

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

More information about the whatwg mailing list