mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Replace unnecessary bind(this)
and var self = this
statements with arrow functions in remaining src/
files
This commit is contained in:
parent
e42fc546a0
commit
6c81b8e6dd
7 changed files with 86 additions and 103 deletions
|
@ -1227,7 +1227,7 @@ function MessageHandler(sourceName, targetName, comObj) {
|
|||
var callbacksCapabilities = this.callbacksCapabilities = Object.create(null);
|
||||
var ah = this.actionHandler = Object.create(null);
|
||||
|
||||
this._onComObjOnMessage = function messageHandlerComObjOnMessage(event) {
|
||||
this._onComObjOnMessage = (event) => {
|
||||
var data = event.data;
|
||||
if (data.targetName !== this.sourceName) {
|
||||
return;
|
||||
|
@ -1279,7 +1279,7 @@ function MessageHandler(sourceName, targetName, comObj) {
|
|||
} else {
|
||||
error('Unknown action from worker: ' + data.action);
|
||||
}
|
||||
}.bind(this);
|
||||
};
|
||||
comObj.addEventListener('message', this._onComObjOnMessage);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue