This is written by greening up the tree with the following patch: https://hg.mozilla.org/try/rev/4f0388e9b8f76ff3008d3ec74ee793bb8f9fc364 All uses are effectively one of these categories: * windowRoot.ownerGlobal usage. Replaced by an explicit .window property. * Things that accidentally were given a window when they expected an element. Fixed by fixing callers as appropriate. Examples of these are using isBrowserPrivate(window) or so, or various test methods that expect a <browser> or <tabbrowser> and were given a Window. * Things that had a window-or-node and used ownerGlobal to normalize to a window. E.g. the AutoScrollChild or extensions code. Fixed by checking explicitly for Window. * Things that had a window and called ownerGlobal on it. Fixed by just removing the ownerGlobal accessor. Main idea after this is to replace all .ownerGlobal usage with .documentGlobal, and remove .ownerGlobal from JS (maybe exposing .relevantGlobal if absolutely needed). Differential Revision: https://phabricator.services.mozilla.com/D295189
15 lines
571 B
JavaScript
15 lines
571 B
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
/* globals windowRoot */
|
|
|
|
class ProxyContextMenu extends HTMLElement {
|
|
openPopupAtScreen(...args) {
|
|
// prettier-ignore
|
|
const parentContextMenuPopup =
|
|
windowRoot.window.document.getElementById("contentAreaContextMenu");
|
|
return parentContextMenuPopup.openPopupAtScreen(...args);
|
|
}
|
|
}
|
|
customElements.define("proxy-context-menu", ProxyContextMenu);
|