html
html copied to clipboard
Can a task throw exceptions?
What is the issue with the HTML Standard?
The event loop does not seem to handle exceptions, so I guess reading as a pedant any exception would shut it down entirely? This doesn't sound right. Probably the definition of task steps should explicitly disallow them from throwing exceptions (and then one could review all of them) or the event loop should quash them.
Per https://infra.spec.whatwg.org/#algorithm-control-flow that seems correct.
I would expect steps that execute JavaScript to handle exceptions in the same way https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke (step 10) does.
Do you have any steps in mind that are problematic?
I noticed it in #10104, but I would be surprised if that was the only offender