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

[Bug 1331081] omit addEventListener/removeEventListener's third parameter when it's false #7965

Merged
merged 1 commit into from
Jan 17, 2017
Merged
Show file tree
Hide file tree
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: 3 additions & 3 deletions web/debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,21 +403,21 @@ var Stepper = (function StepperClosure() {
var listener = function(e) {
switch (e.keyCode) {
case 83: // step
dom.removeEventListener('keydown', listener, false);
dom.removeEventListener('keydown', listener);
self.nextBreakPoint = self.currentIdx + 1;
self.goTo(-1);
callback();
break;
case 67: // continue
dom.removeEventListener('keydown', listener, false);
dom.removeEventListener('keydown', listener);
var breakPoint = self.getNextBreakPoint();
self.nextBreakPoint = breakPoint;
self.goTo(-1);
callback();
break;
}
};
dom.addEventListener('keydown', listener, false);
dom.addEventListener('keydown', listener);
self.goTo(idx);
},
goTo: function goTo(idx) {
Expand Down
4 changes: 2 additions & 2 deletions web/firefoxcom.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ var FirefoxCom = (function FirefoxComClosure() {

document.documentElement.removeChild(node);

document.removeEventListener('pdf.js.response', listener, false);
document.removeEventListener('pdf.js.response', listener);
return callback(response);
}, false);
});
}
document.documentElement.appendChild(request);

Expand Down
11 changes: 5 additions & 6 deletions web/pdf_history.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
} else {
updateHistoryWithCurrentHash();
}
}, false);
});


function updateHistoryWithCurrentHash() {
Expand Down Expand Up @@ -162,18 +162,17 @@
}
// Remove the event listener when navigating away from the document,
// since 'beforeunload' prevents Firefox from caching the document.
window.removeEventListener('beforeunload', pdfHistoryBeforeUnload,
false);
window.removeEventListener('beforeunload', pdfHistoryBeforeUnload);
}

window.addEventListener('beforeunload', pdfHistoryBeforeUnload, false);
window.addEventListener('beforeunload', pdfHistoryBeforeUnload);

window.addEventListener('pageshow', function pdfHistoryPageShow(evt) {
// If the entire viewer (including the PDF file) is cached in
// the browser, we need to reattach the 'beforeunload' event listener
// since the 'DOMContentLoaded' event is not fired on 'pageshow'.
window.addEventListener('beforeunload', pdfHistoryBeforeUnload, false);
}, false);
window.addEventListener('beforeunload', pdfHistoryBeforeUnload);
});

self.eventBus.on('presentationmodechanged', function(e) {
self.isViewerInPresentationMode = e.active;
Expand Down
4 changes: 2 additions & 2 deletions web/pdf_print_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@
event.stopImmediatePropagation();
}
};
window.addEventListener('beforeprint', stopPropagationIfNeeded, false);
window.addEventListener('afterprint', stopPropagationIfNeeded, false);
window.addEventListener('beforeprint', stopPropagationIfNeeded);
window.addEventListener('afterprint', stopPropagationIfNeeded);
}

var overlayPromise;
Expand Down