barbushin / javascript-errors-notifier

Google Chrome and Firefox extension that notifies about JavaScritp errors by icon in address bar & popups
MIT License
206 stars 62 forks source link

Fixed problem with unavailable details in a secured context. #95

Closed neochief closed 10 months ago

neochief commented 4 years ago

It seems that there are multiple problems arise from the fact that the extension doesn't use messaging API instead of passing events. In my case, there was a problem outlined in https://github.com/barbushin/javascript-errors-notifier/issues/92 on an error inside svg file.

It turned out, that in a mixed context environment when making "document.dispatchEvent", the resulting event won't contain the detail object. Some info about this can be located at the bottom of this page: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent

In this pull request, I improved the way the messages are being sent.