This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
See also bug 25138 comment 2. To define event listeners I need a way to invoke a callback and instead of rethrowing the exceptions, report them for window.onerror. Bug 17713 comment 16 has a long list of algorithms that need to invoke the same hook. I suppose there might be a difference between some whether microtasks need to be run at the end, have not investigated.
I added "report the exception". Does that handle it? I'm not really sure I understand the request here.
That got added as part of https://html5.org/r/8849 it seems. Ian, as said in comment 0, in bug 25138 you said this: "Happy to add something that invokes a callback and then catches and reports exceptions."
I am still happy to add that if that's what you need. As I implied in bug 25318 comment 2, though, I can't do that until there's a definition of "invoke" that I can use. Right now, you would just say (modulo there being no definition of "invoke"): Invoke the callback /callback/. If this raises an exception, /report the exception/. Do you really need a macro just for that? I mean, it would probably just turn the above into something like: Invoke the callback /callback/ using the /exception- reporting algorithm/. ...which doesn't seem any better. It's barely any shorter, and it's more confusing.
I thought there was something else around invoke that was needed, with respect to code entry-points.
That is, that a more elaborate setup was needed to invoke a callback. I thought we'd run microtasks after them as well. Just saying "invoke" probably does not do that.
Yes. But that belongs in WebIDL. That's what bug 25138 is about.
That bug is just about a hook for the IDL algorithm, no? IDL doesn't know about microtasks.
What does microtasks have to do with anything? I thought we were just talking about calling a callback. Microtasks happen at the end of tasks, no? I feel like there's some grand vision that I'm missing here, and you keep showing me individual puzzle pieces and expecting me to draw the whole thing...
Sorry for the confusion. I never really understood when microtasks were supposed to run. I thought it was both at the end of task and after event listener callbacks. I was hoping you still had all the pieces in your head with respect to how we wanted to define this interaction of events, IDL, and HTML. It seems I'm wrong so I guess you should close this, I should start using the new "report the exception" mechanism and we'll see if anything is still undefined.
As per the commit mentioned in comment 2. It seems nothing much else is needed here after all.