Skip to content

Commit

Permalink
Fix EventTarget callback invocation context.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaovieira committed Feb 3, 2018
1 parent 738d51a commit 8f778f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/abortsignal-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@
if (!(event.type in this.listeners)) {
return
}
var self = this
function debounce (fn) {
setTimeout(function () {
fn.call(this, event)
fn.call(self, event)
}, 0)
}
var stack = this.listeners[event.type]
Expand Down

0 comments on commit 8f778f3

Please sign in to comment.