question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't just call window.onunhandledrejection, fire a CustomEvent too

See original GitHub issue

Would be nice to be able to use addEventListener. It’s very jarring to have .on... work but .addEventListener("...", fn) fail.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
benjamingrcommented, Jan 20, 2015

@domenic to be fair it’s stated very explicitly in the documentation. If it were up to me and not petka we wouldn’t fire either until you guys decide what you want to do at a spec level.

I’m yet to see a browser case where multiple libraries are present that are capable of reporting unhandled rejections - and for a single library you can do Promise.onPossiblyUnhandledRejection(...)

0reactions
domeniccommented, Jan 20, 2015

Awesome, exactly what I was wondering.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Window: unhandledrejection event - Web APIs | MDN
The unhandledrejection event is sent to the global scope of a script when a JavaScript Promise that has no rejection handler is rejected; ......
Read more >
Dispatching custom events - The Modern JavaScript Tutorial
If an event handler calls methods that trigger other events – they are processed synchronously too, in a nested fashion. Let's say we...
Read more >
CustomEvent in IE with window.opener - Stack Overflow
Trigger the event from the parent with jQuery ... I use hashchange event as a workaround since IE11 doesn't fire event to window.opener...
Read more >
GTMTips: Use An All Events Trigger For More Control
In this article, we'll explore a cool use case for the trigger I call an All Events trigger. An All Events trigger is...
Read more >
Custom Events in JavaScript - KIRUPA
Don't just use events that others have created. ... The first thing is to create our custom event by calling the CustomEvent constructor:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found