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

Implemented loop based on hidden candidates #78

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/bugsnag.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,9 @@
// EventTarget is all that's required in modern chrome/opera
// EventTarget + Window + ModalWindow is all that's required in modern FF (there are a few Moz prefixed ones that we're ignoring)
// The rest is a collection of stuff for Safari and IE 11. (Again ignoring a few MS and WebKit prefixed things)
"EventTarget Window Node ApplicationCache AudioTrackList ChannelMergerNode CryptoOperation EventSource FileReader HTMLUnknownElement IDBDatabase IDBRequest IDBTransaction KeyOperation MediaController MessagePort ModalWindow Notification SVGElementInstance Screen TextTrack TextTrackCue TextTrackList WebSocket WebSocketWorker Worker XMLHttpRequest XMLHttpRequestEventTarget XMLHttpRequestUpload".replace(/\w+/g, function (global) {
var list = Object.getOwnPropertyNames( window );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should do with a check to see if Object.getOwnPropertyNames is defined (< IE9).

for( var i in list ) {
var global = list[i];
var prototype = window[global] && window[global].prototype;
if (prototype && prototype.hasOwnProperty && prototype.hasOwnProperty("addEventListener")) {
polyFill(prototype, "addEventListener", function (_super) {
Expand All @@ -663,7 +665,7 @@
};
});
}
});
}
}

return self;
Expand Down