Closed Bug 1722448 Opened 3 years ago Closed 3 years ago

Implement self.reportError()

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: annevk, Assigned: evilpie)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

This allows libraries to emulate the behavior of throwing exceptions in an event listener (triggers self.onerror).

HTML change: https://github.com/whatwg/html/pull/1196.

Tests: https://github.com/web-platform-tests/wpt/pull/29738.

I am going investigate this soon.

Assignee: nobody → evilpies

This is mostly just copying and adjusting code from AutoJSAPI::ReportException.
For nsGlobalWindowInner::ReportError, we might need to move this to outer, but I am not sure when that is actually required.
I also wasn't sure how we want to do the isChrome check.

Depends on: 1721660
Attachment #9233474 - Attachment description: WIP: Bug 1722448 - WIP: Implement self.reportError() → Bug 1722448 - Implement self.reportError(). r?emilio
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/31f0b3f997a4
Implement self.reportError(). r=emilio,smaug
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

Hi
FYI docs work for this can be tracked in https://github.com/mdn/content/issues/8608.
I'm still working on how/where to document because global things are a bit spread out. As a starting point though I have created https://github.com/mdn/content/pull/9314 (reportError() global function) and would welcome feedback.

Blocks: 1746186
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: