This function, available in windows and workers, allows developers to report errors to the console and any global "error" event handlers, in the same way as an uncaught JavaScript exception. It is mainly useful for custom event-dispatching or callback-manipulating libraries.
Low. Mozilla was the one that originally proposed this in the spec PR, and has already shipped. It is likely pretty easy to implement for WebKit as it is just exposing existing functionality to JavaScript.
This feature is somewhat polyfillable using explicit self.dispatchEvent(new ErrorEvent(...)) plus console.error(), but it won't be quite first-class. In the meantime most developers have resorted to setTimeout(() => { throw e; }, 0) which loses stack trace information.
This feature doesn't need any extra DevTools support. It builds on the existing code that makes exception reporting work.
Contact emails
dom...@chromium.orgExplainer
https://github.com/whatwg/console/issues/50, or perhaps the below summary, should suffice; this is a very small feature.Specification
https://html.spec.whatwg.org/#dom-reporterrorSummary
This function, available in windows and workers, allows developers to report errors to the console and any global "error" event handlers, in the same way as an uncaught JavaScript exception. It is mainly useful for custom event-dispatching or callback-manipulating libraries.
Blink component
Blink>HTML>ScriptTAG review
This is a minor exposure of browser functionality with a one-line spec. I'm happy to file for review if people think it would be helpful but I don't think there's much architecturally to discuss here.
TAG review status
Not applicableRisks
Interoperability and Compatibility
Low. Mozilla was the one that originally proposed this in the spec PR, and has already shipped. It is likely pretty easy to implement for WebKit as it is just exposing existing functionality to JavaScript.
Gecko: Shipped/Shipping. They pass all the web platform tests on wpt.fyi
WebKit: No signal (https://lists.webkit.org/pipermail/webkit-dev/2021-August/031960.html)
Web developers: Positive (https://github.com/whatwg/html/pull/1196#issuecomment-854177687). A number of frameworks and libraries have mentioned that they would use this in the way it was designed, to better report exceptions in their custom callback dispatch code.Activation
This feature is somewhat polyfillable using explicit self.dispatchEvent(new ErrorEvent(...)) plus console.error(), but it won't be quite first-class. In the meantime most developers have resorted to setTimeout(() => { throw e; }, 0) which loses stack trace information.
Debuggability
This feature doesn't need any extra DevTools support. It builds on the existing code that makes exception reporting work.
Is this feature fully tested by web-platform-tests?
Yes
Requires code in //chrome?
FalseTracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1233383
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5634523220934656This intent message was generated by Chrome Platform Status.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM0wra-L-Jqk5W2_XLU35t0LhKqnu0igYWJQSE20cqPxwmr3Zg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/13bfc8f7-f6eb-0774-356e-3f0f57ff23e7%40igalia.com.