fx140: Fix ChromeUtils.defineESModuleGetters(this, ...) in MJS files

`this` is undefined - use globalThis.
This commit is contained in:
Abe Jellinek 2025-07-02 11:15:58 -04:00 • committed by Dan Stillman
parent 7b7c153711
commit be0cc2c602
5 changed files with 5 additions and 10 deletions

View file

@ -23,7 +23,7 @@
***** END LICENSE BLOCK *****
*/
ChromeUtils.defineESModuleGetters(this, {
ChromeUtils.defineESModuleGetters(globalThis, {
Zotero: "chrome://zotero/content/zotero.mjs",
});

View file

@ -1,4 +1,4 @@
ChromeUtils.defineESModuleGetters(this, {
ChromeUtils.defineESModuleGetters(globalThis, {
Zotero: "chrome://zotero/content/zotero.mjs"
});

View file

@ -1,4 +1,4 @@
ChromeUtils.defineESModuleGetters(this, {
ChromeUtils.defineESModuleGetters(globalThis, {
Zotero: "chrome://zotero/content/zotero.mjs"
});

View file

@ -1,6 +1,6 @@
/* global JSWindowActorParent:false */
ChromeUtils.defineESModuleGetters(this, {
ChromeUtils.defineESModuleGetters(globalThis, {
Zotero: "chrome://zotero/content/zotero.mjs"
});

View file

@ -1,9 +1,4 @@
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
XPCOMUtils.defineLazyModuleGetters(this, {
});
ChromeUtils.defineESModuleGetters(this, {
ChromeUtils.defineESModuleGetters(globalThis, {
Zotero: "chrome://zotero/content/zotero.mjs",
});