The "initialization" steps for Web browsers
Boris Zbarsky
bzbarsky at MIT.EDU
Tue Jul 22 19:14:54 PDT 2014
On 7/22/14, 7:21 PM, Allen Wirfs-Brock wrote:
> I didn't see where in the process of invoking an event handler that you
> call the [[Call]] internal method of the callback function.
Yeah, this part needs clarification. Something in here needs to
explicitly invoke
http://heycam.github.io/webidl/#es-invoking-callback-functions which
will do the [[Call]] bits.
> You also need to handle any exceptions that come back from
> the [[Call]].
This is a bit of a mess in general. :( What _should_ happen, more or
less, is that this code just propagates the exception and event dispatch
then catches-and-reports it before moving on to the next event listener.
The DOM spec doesn't seem to do a very good job of describing what it
does with exceptions...
> BTW, I'm also assuming that a batch of events would be
> handled as a single ES job
Hmm... event dispatch can happen synchronously from script like so:
target.dispatchEvent(new Event("foo"));
which will trigger all event listeners for "foo" on the target before
the dispatchEvent call returns.
So we're starting out in an ES job here; are you saying the
dispatchEvent call creates a new one?
> Overall, my sense is that we are inching in a good direction but that
> there is a fair amount of work that is still need to enable the HTML and
> ES specs to smoothly plug together.
Agreed.
-Boris
More information about the es-discuss
mailing list