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:
parent
7fd3db9977
commit
3e6e294fd4
4 changed files with 48 additions and 19 deletions
|
@ -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 = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue