mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #11431 from wojtekmaj/secondary-toolbar-const
Use const in secondary_toolbar.js
This commit is contained in:
commit
a6188a5c98
1 changed files with 3 additions and 2 deletions
|
@ -12,6 +12,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* eslint no-var: error, prefer-const: error */
|
||||
|
||||
import { SCROLLBAR_PADDING, ScrollMode, SpreadMode } from './ui_utils';
|
||||
import { CursorTool } from './pdf_cursor_tools';
|
||||
|
@ -172,8 +173,8 @@ class SecondaryToolbar {
|
|||
for (const { element, eventName, close, eventDetails, } of this.buttons) {
|
||||
element.addEventListener('click', (evt) => {
|
||||
if (eventName !== null) {
|
||||
let details = { source: this, };
|
||||
for (let property in eventDetails) {
|
||||
const details = { source: this, };
|
||||
for (const property in eventDetails) {
|
||||
details[property] = eventDetails[property];
|
||||
}
|
||||
this.eventBus.dispatch(eventName, details);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue