Bug 1768175 - Clean up some unnecessary global definitions (location, sizeToContent) for ESLint. r=Gijs

The 'location: true' addition has filtered down to ESLint a while ago, so we no longer need to define it ourselves.
sizeToContent can be used from the window object directly.

Differential Revision: https://phabricator.services.mozilla.com/D145720
This commit is contained in:
Mark Banner 2022-05-09 10:15:34 +00:00
parent eb159be8ad
commit 3ff024cf6e
3 changed files with 2 additions and 8 deletions

View File

@ -195,7 +195,7 @@ function onAlertLoad() {
let alertImageBox = document.getElementById("alertImageBox");
alertImageBox.style.minHeight = alertTextBox.scrollHeight + "px";
sizeToContent();
window.sizeToContent();
if (gReplacedWindow && !gReplacedWindow.closed) {
moveWindowToReplace(gReplacedWindow);

View File

@ -216,7 +216,7 @@
dump(
"Trying to position a sizeless window; caller should have called sizeToContent() or sizeTo(). See bug 75649.\n"
);
sizeToContent();
window.sizeToContent();
}
if (opener) {

View File

@ -34,13 +34,7 @@ module.exports = {
InternalError: true,
// https://developer.mozilla.org/docs/Web/API/Window/dump
dump: true,
// Override the "browser" env definition of "location" to allow writing as it
// is a writeable property.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1509270#c1 for more information.
location: true,
openDialog: false,
// https://developer.mozilla.org/docs/Web/API/Window/sizeToContent
sizeToContent: false,
// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/uneval
uneval: false,
},