Bug 1691274 - Use DOM hidden property methods instead of attribute methods in browser/ directory. r=ntim,preferences-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D104552
This commit is contained in:
james
2021-02-13 23:33:51 +00:00
parent c482a85d2a
commit c8a67215e0
27 changed files with 55 additions and 83 deletions

View File

@@ -691,11 +691,9 @@ HistoryMenu.prototype = {
},
toggleHiddenTabs() {
if (window.gBrowser && gBrowser.visibleTabs.length < gBrowser.tabs.length) {
this.hiddenTabsMenu.removeAttribute("hidden");
} else {
this.hiddenTabsMenu.setAttribute("hidden", "true");
}
const isShown =
window.gBrowser && gBrowser.visibleTabs.length < gBrowser.tabs.length;
this.hiddenTabsMenu.hidden = !isShown;
},
toggleRecentlyClosedTabs: function HM_toggleRecentlyClosedTabs() {
@@ -786,11 +784,11 @@ HistoryMenu.prototype = {
}
if (!PlacesUIUtils.shouldShowTabsFromOtherComputersMenuitem()) {
this.syncTabsMenuitem.setAttribute("hidden", true);
this.syncTabsMenuitem.hidden = true;
return;
}
this.syncTabsMenuitem.setAttribute("hidden", false);
this.syncTabsMenuitem.hidden = false;
},
_onPopupShowing: function HM__onPopupShowing(aEvent) {