Use for...of
in a couple of loops in web/toolbar.js
and web/secondary_toolbar.js
This commit is contained in:
parent
3edaebbded
commit
eaa2e216f4
@ -169,9 +169,7 @@ class SecondaryToolbar {
|
||||
this.toggleButton.addEventListener('click', this.toggle.bind(this));
|
||||
|
||||
// All items within the secondary toolbar.
|
||||
for (let button in this.buttons) {
|
||||
let { element, eventName, close, eventDetails, } = this.buttons[button];
|
||||
|
||||
for (const { element, eventName, close, eventDetails, } of this.buttons) {
|
||||
element.addEventListener('click', (evt) => {
|
||||
if (eventName !== null) {
|
||||
let details = { source: this, };
|
||||
|
@ -201,10 +201,8 @@ class Toolbar {
|
||||
let customScale = Math.round(pageScale * 10000) / 100;
|
||||
this.l10n.get('page_scale_percent', { scale: customScale, },
|
||||
'{{scale}}%').then((msg) => {
|
||||
let options = items.scaleSelect.options;
|
||||
let predefinedValueFound = false;
|
||||
for (let i = 0, ii = options.length; i < ii; i++) {
|
||||
let option = options[i];
|
||||
for (const option of items.scaleSelect.options) {
|
||||
if (option.value !== pageScaleValue) {
|
||||
option.selected = false;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user