Merge pull request #7965 from Snuffleupagus/bug-1331081
[Bug 1331081] omit addEventListener/removeEventListener's third parameter when it's false
This commit is contained in:
commit
a917443ae6
@ -403,13 +403,13 @@ 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);
|
||||
@ -417,7 +417,7 @@ var Stepper = (function StepperClosure() {
|
||||
break;
|
||||
}
|
||||
};
|
||||
dom.addEventListener('keydown', listener, false);
|
||||
dom.addEventListener('keydown', listener);
|
||||
self.goTo(idx);
|
||||
},
|
||||
goTo: function goTo(idx) {
|
||||
|
@ -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);
|
||||
|
||||
|
@ -114,7 +114,7 @@
|
||||
} else {
|
||||
updateHistoryWithCurrentHash();
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
|
||||
|
||||
function updateHistoryWithCurrentHash() {
|
||||
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user