1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-29 15:47:57 +02:00

Refactors PDFFindBar and FirefoxCom find events.

This commit is contained in:
Yury Delendik 2016-04-28 07:11:40 -05:00
parent 7fd3db9977
commit 3e6e294fd4
4 changed files with 48 additions and 19 deletions

View file

@ -71,22 +71,6 @@ var PDFFindController = (function PDFFindControllerClosure() {
}
PDFFindController.prototype = {
listenWindowEvents: function PDFFindController_listenWindowEvents() {
var events = [
'find',
'findagain',
'findhighlightallchange',
'findcasesensitivitychange'
];
var handleEvent = function (e) {
this.executeCommand(e.type, e.detail);
}.bind(this);
for (var i = 0, len = events.length; i < len; i++) {
window.addEventListener(events[i], handleEvent);
}
},
reset: function PDFFindController_reset() {
this.startedTextExtraction = false;
this.extractTextPromises = [];