mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Replace unnecessary bind(this)
statements with arrow functions in web/
files
By using `let`, which is block-scoped, instead of `var` in a couple of places we're able to get rid of additional `bind` calls.
This commit is contained in:
parent
3adda80f97
commit
f27b5013e2
12 changed files with 53 additions and 57 deletions
|
@ -94,11 +94,11 @@ var TextLayerBuilder = (function TextLayerBuilderClosure() {
|
|||
timeout,
|
||||
enhanceTextSelection: this.enhanceTextSelection,
|
||||
});
|
||||
this.textLayerRenderTask.promise.then(function () {
|
||||
this.textLayerRenderTask.promise.then(() => {
|
||||
this.textLayerDiv.appendChild(textLayerFrag);
|
||||
this._finishRendering();
|
||||
this.updateMatches();
|
||||
}.bind(this), function (reason) {
|
||||
}, function (reason) {
|
||||
// cancelled or failed to render text layer -- skipping errors
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue