From 3672da6c0c76bc4002f38fd97589e82b445fe4f4 Mon Sep 17 00:00:00 2001 From: Tim Nguyen Date: Thu, 11 Feb 2021 09:45:09 +0000 Subject: [PATCH] Bug 1692097 - Remove remaining X.setAttribute("hidden", "true") references from devtools/client. r=nchevobbe Differential Revision: https://phabricator.services.mozilla.com/D104774 --- devtools/client/framework/devtools-browser.js | 9 +-------- devtools/client/storage/test/head.js | 7 +------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/devtools/client/framework/devtools-browser.js b/devtools/client/framework/devtools-browser.js index 0a211a0494dc..a0a08d33a30d 100644 --- a/devtools/client/framework/devtools-browser.js +++ b/devtools/client/framework/devtools-browser.js @@ -646,14 +646,7 @@ var gDevToolsBrowser = (exports.gDevToolsBrowser = { const menu = win.document.getElementById("menu_devToolbox"); // Hide the "Toggle Tools" menu item if we are on about:devtools-toolbox. - const isAboutDevtoolsToolbox = gDevToolsBrowser._isAboutDevtoolsToolbox( - win - ); - if (isAboutDevtoolsToolbox) { - menu.setAttribute("hidden", "true"); - } else { - menu.removeAttribute("hidden"); - } + menu.hidden = gDevToolsBrowser._isAboutDevtoolsToolbox(win); // Add a checkmark for the "Toggle Tools" menu item if a toolbox is already opened. const hasToolbox = gDevToolsBrowser.hasToolboxOpened(win); diff --git a/devtools/client/storage/test/head.js b/devtools/client/storage/test/head.js index 68dcfb378fed..b930d63bea1d 100644 --- a/devtools/client/storage/test/head.js +++ b/devtools/client/storage/test/head.js @@ -814,12 +814,7 @@ function checkCellUneditable(id, column) { function showColumn(id, state) { const columns = gUI.table.columns; const column = columns.get(id); - - if (state) { - column.wrapper.removeAttribute("hidden"); - } else { - column.wrapper.setAttribute("hidden", true); - } + column.wrapper.hidden = !state; } /**