Re: [w3c/webcomponents] Clarify "report an exception" for Custom Elements (#635)

> The exception thrown from the constructor will get taken care of automatically by the guarded flag, right?

In this case we will unset the guarded flag, because as noted in those algorithms, we catch and handle exceptions specifically.

> https://html.spec.whatwg.org/multipage/scripting.html#invoke-custom-element-reactions

This will work as today; "If this throws any exception, then report the exception." It's not like we're removing the ability to report exceptions...

> For 3), the exceptions will be reported to the document's window (since it is during parsing), right? What about the 1) and 2)?

Again, the spec is very clear on this today. The "create an element" algorithm explicitly catches exceptions and reports them. That'll still work fine.

---

In general, nothing about the plan on whatwg/html#958 will change the behavior of the custom elements spec. It might let us shorten some of the steps by e.g. using the guarded flag, but probably we'll just leave them alone.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/635#issuecomment-296846127

Received on Monday, 24 April 2017 23:05:50 UTC