Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a console.* API that invokes the HTML "report the error" algorithm (which calls window.onerror) #50

Closed
annevk opened this issue Apr 4, 2016 · 5 comments · Fixed by whatwg/html#1196

Comments

@annevk
Copy link
Member

annevk commented Apr 4, 2016

See https://lists.w3.org/Archives/Public/public-web-perf/2014Jun/0036.html and https://esdiscuss.org/topic/a-way-of-explicitly-reporting-exceptions for interest.

See https://www.w3.org/Bugs/Public/show_bug.cgi?id=26182 for the previous issue on this (merged into this new one since the idea seems to be to have it on console).

@zcorpan
Copy link
Member

zcorpan commented Apr 4, 2016

Need to consider workers and worklets also.

@annevk
Copy link
Member Author

annevk commented Apr 5, 2016

@zcorpan console is exposed to workers. Dunno about worklets.

@zcorpan
Copy link
Member

zcorpan commented Apr 5, 2016

Right, I mean we need to make sure this API invokes the right hooks in those contexts (or define to do nothing or throw if it shouldn't work there). https://html.spec.whatwg.org/multipage/workers.html#runtime-script-errors-2 is different from https://html.spec.whatwg.org/multipage/webappapis.html#runtime-script-errors-in-documents

@domenic
Copy link
Member

domenic commented May 4, 2016

Now that I realize this would trigger window.onerror I no longer think this is a console API, for what it's worth. Probably global.reportException(obj).

annevk added a commit to whatwg/html that referenced this issue May 5, 2016
@domenic
Copy link
Member

domenic commented May 5, 2016

Trying to gather implementer interest over at whatwg/html#1196, for any implementers watching this repo.

@domenic domenic closed this as completed Oct 17, 2016
annevk added a commit to whatwg/html that referenced this issue May 15, 2017
annevk added a commit to whatwg/html that referenced this issue Jan 11, 2019
domenic added a commit to whatwg/html that referenced this issue Jun 4, 2021
domenic added a commit to whatwg/html that referenced this issue Jun 4, 2021
domenic added a commit to whatwg/html that referenced this issue Jun 17, 2021
domenic added a commit to whatwg/html that referenced this issue Jun 17, 2021
annevk added a commit to whatwg/html that referenced this issue Jul 27, 2021
This allows libraries to emulate the behavior of an exception thrown in an event listener callback.

Additional context: whatwg/console#50.

Tests: web-platform-tests/wpt#29738.

Co-authored-by: Domenic Denicola <[email protected]>
mfreed7 pushed a commit to mfreed7/html that referenced this issue Jun 3, 2022
This allows libraries to emulate the behavior of an exception thrown in an event listener callback.

Additional context: whatwg/console#50.

Tests: web-platform-tests/wpt#29738.

Co-authored-by: Domenic Denicola <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants