-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inline single-line event handlers in the
web/app.js
file
We have a fair number of (effectively) single-line event handlers in the `web/app.js` file, which leads to unnecessarily verbose code. These can, without affecting readability too much, be replaced either by: - Using `bind` for the simplest cases. - Using arrow-functions for the remaining ones. Note that this is possible since we started removing event listeners with `AbortSignal`, which means that we no longer need to keep a reference to the event handler functions to be able to remove them. Given that the old event handler functions use fairly long function names, and the way that they access `PDFViewerApplication` (given their scope), they impact the overall code-size unnecessarily. *Note:* This patch reduces the size of the `gulp mozcentral` output by `~3.5` kilo-bytes, which isn't a lot but still cannot hurt.
- Loading branch information
1 parent
8f45374
commit 83b143a
Showing
1 changed file
with
58 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters