Skip to content

Commit

Permalink
Merge pull request mozilla#8354 from Snuffleupagus/PdfStreamConverter…
Browse files Browse the repository at this point in the history
…-remove-bind

[Firefox addon] Replace a `bind(this)` statement with an arrow function in `PdfStreamConverter.jsm` (issue 8343)
  • Loading branch information
timvandermeij authored Apr 30, 2017
2 parents a234ab4 + 220357e commit 207a773
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/firefox/content/PdfStreamConverter.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -804,10 +804,10 @@ class FindEventManager {
}

bind() {
var unload = function(e) {
var unload = (evt) => {
this.unbind();
this.contentWindow.removeEventListener(e.type, unload);
}.bind(this);
this.contentWindow.removeEventListener(evt.type, unload);
};
this.contentWindow.addEventListener("unload", unload);

// We cannot directly attach listeners to for the find events
Expand Down

0 comments on commit 207a773

Please sign in to comment.