Skip to content

Commit 4e07a1b

Browse files
danilsomsikovDevtools-frontend LUCI CQ
authored andcommitted
Remove the usage of checkboxElement in the Application panel
Bug: 410500405 Change-Id: I9f0ecb0ae537808bb46dfb90d97c08bde3bc50b2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6450695 Reviewed-by: Kateryna Prokopenko <[email protected]> Auto-Submit: Danil Somsikov <[email protected]> Commit-Queue: Danil Somsikov <[email protected]>
1 parent 92752ac commit 4e07a1b

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

front_end/panels/application/AppManifestView.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
772772
setIconMaskedCheckbox.setAttribute(
773773
'jslog', `${VisualLogging.toggle('show-minimal-safe-area-for-maskable-icons').track({change: true})}`);
774774
setIconMaskedCheckbox.addEventListener('click', () => {
775-
this.iconsSection.setIconMasked(setIconMaskedCheckbox.checkboxElement.checked);
775+
this.iconsSection.setIconMasked(setIconMaskedCheckbox.checked);
776776
});
777777
this.iconsSection.appendRow().appendChild(setIconMaskedCheckbox);
778778
const documentationLink = UI.XLink.XLink.create(
@@ -1233,8 +1233,8 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
12331233
const wcoOsCheckbox =
12341234
UI.UIUtils.CheckboxLabel.create(i18nString(UIStrings.selectWindowControlsOverlayEmulationOs), false);
12351235

1236-
wcoOsCheckbox.checkboxElement.addEventListener('click', async () => {
1237-
await this.overlayModel?.toggleWindowControlsToolbar(wcoOsCheckbox.checkboxElement.checked);
1236+
wcoOsCheckbox.addEventListener('click', async () => {
1237+
await this.overlayModel?.toggleWindowControlsToolbar(wcoOsCheckbox.checked);
12381238
});
12391239

12401240
const osSelectElement = wcoOsCheckbox.createChild('select');
@@ -1252,7 +1252,7 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
12521252
osSelectElement.options[osSelectElement.selectedIndex].value as SDK.OverlayModel.EmulatedOSType;
12531253
if (this.overlayModel) {
12541254
this.overlayModel.setWindowControlsPlatform(selectedOS);
1255-
await this.overlayModel.toggleWindowControlsToolbar(wcoOsCheckbox.checkboxElement.checked);
1255+
await this.overlayModel.toggleWindowControlsToolbar(wcoOsCheckbox.checked);
12561256
}
12571257
});
12581258

front_end/panels/application/CookieItemsView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class CookiePreviewWidget extends UI.Widget.VBox {
108108
i18nString(UIStrings.showUrlDecoded), this.showDecodedSetting.get(), undefined, 'show-url-decoded');
109109
toggle.title = i18nString(UIStrings.showUrlDecoded);
110110
toggle.classList.add('cookie-preview-widget-toggle');
111-
toggle.checkboxElement.addEventListener('click', () => this.showDecoded(!this.showDecodedSetting.get()));
111+
toggle.addEventListener('click', () => this.showDecoded(!this.showDecodedSetting.get()));
112112
header.appendChild(toggle);
113113
this.toggle = toggle;
114114

@@ -128,7 +128,7 @@ class CookiePreviewWidget extends UI.Widget.VBox {
128128
return;
129129
}
130130
this.showDecodedSetting.set(decoded);
131-
this.toggle.checkboxElement.checked = decoded;
131+
this.toggle.checked = decoded;
132132
this.updatePreview();
133133
}
134134

front_end/panels/application/StorageView.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
227227
this.quotaOverrideCheckbox.setAttribute(
228228
'jslog', `${VisualLogging.toggle('simulate-custom-quota').track({change: true})}`);
229229
quotaOverrideCheckboxRow.appendChild(this.quotaOverrideCheckbox);
230-
this.quotaOverrideCheckbox.checkboxElement.addEventListener('click', this.onClickCheckbox.bind(this), false);
230+
this.quotaOverrideCheckbox.addEventListener('click', this.onClickCheckbox.bind(this), false);
231231
this.quotaOverrideControlRow = quota.appendRow();
232232
this.quotaOverrideEditor = this.quotaOverrideControlRow.createChild('input', 'quota-override-notification-editor');
233233
this.quotaOverrideEditor.setAttribute(
@@ -343,7 +343,7 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
343343

344344
if (oldOrigin !== this.securityOrigin) {
345345
this.quotaOverrideControlRow.classList.add('hidden');
346-
this.quotaOverrideCheckbox.checkboxElement.checked = false;
346+
this.quotaOverrideCheckbox.checked = false;
347347
this.quotaOverrideErrorMessage.textContent = '';
348348
}
349349
void this.doUpdate();
@@ -357,7 +357,7 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
357357

358358
if (oldStorageKey !== this.storageKey) {
359359
this.quotaOverrideControlRow.classList.add('hidden');
360-
this.quotaOverrideCheckbox.checkboxElement.checked = false;
360+
this.quotaOverrideCheckbox.checked = false;
361361
this.quotaOverrideErrorMessage.textContent = '';
362362
}
363363
void this.doUpdate();
@@ -406,12 +406,12 @@ export class StorageView extends UI.ThrottledWidget.ThrottledWidget {
406406
private async onClickCheckbox(): Promise<void> {
407407
if (this.quotaOverrideControlRow.classList.contains('hidden')) {
408408
this.quotaOverrideControlRow.classList.remove('hidden');
409-
this.quotaOverrideCheckbox.checkboxElement.checked = true;
409+
this.quotaOverrideCheckbox.checked = true;
410410
this.quotaOverrideEditor.value = this.previousOverrideFieldValue;
411411
this.quotaOverrideEditor.focus();
412412
} else if (this.target && this.securityOrigin) {
413413
this.quotaOverrideControlRow.classList.add('hidden');
414-
this.quotaOverrideCheckbox.checkboxElement.checked = false;
414+
this.quotaOverrideCheckbox.checked = false;
415415
await this.clearQuotaForOrigin(this.target, this.securityOrigin);
416416
this.quotaOverrideErrorMessage.textContent = '';
417417
}

0 commit comments

Comments
 (0)