From f88cd2a7d731d4df8fff76b362123a8f9600b856 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 1 Jul 2025 12:14:36 -0400 Subject: [PATCH] ESMify actors --- chrome/content/zotero/RemoteTranslate.jsm | 10 ++---- chrome/content/zotero/actors/ActorManager.mjs | 33 +++++++++---------- ...eadyChild.jsm => DocumentIsReadyChild.mjs} | 6 ++-- ...Child.jsm => ExternalLinkHandlerChild.mjs} | 7 ++-- ...rent.jsm => ExternalLinkHandlerParent.mjs} | 4 +-- ...bstractChild.jsm => FeedAbstractChild.mjs} | 4 +-- ...tractParent.jsm => FeedAbstractParent.mjs} | 4 +-- ...leyAuthChild.jsm => MendeleyAuthChild.mjs} | 6 ++-- ...yAuthParent.jsm => MendeleyAuthParent.mjs} | 6 ++-- .../{PageDataChild.jsm => PageDataChild.mjs} | 6 ++-- ...uChild.jsm => SequoiaContextMenuChild.mjs} | 6 ++-- ...arent.jsm => SequoiaContextMenuParent.mjs} | 4 +-- ...ingleFileChild.jsm => SingleFileChild.mjs} | 6 ++-- ...nslationChild.jsm => TranslationChild.mjs} | 10 +++--- ...lationParent.jsm => TranslationParent.mjs} | 10 +++--- ...eroPrintChild.jsm => ZoteroPrintChild.mjs} | 5 +-- ...oPrintParent.jsm => ZoteroPrintParent.mjs} | 6 ++-- 17 files changed, 47 insertions(+), 86 deletions(-) rename chrome/content/zotero/actors/{DocumentIsReadyChild.jsm => DocumentIsReadyChild.mjs} (50%) rename chrome/content/zotero/actors/{ExternalLinkHandlerChild.jsm => ExternalLinkHandlerChild.mjs} (91%) rename chrome/content/zotero/actors/{ExternalLinkHandlerParent.jsm => ExternalLinkHandlerParent.mjs} (66%) rename chrome/content/zotero/actors/{FeedAbstractChild.jsm => FeedAbstractChild.mjs} (93%) rename chrome/content/zotero/actors/{FeedAbstractParent.jsm => FeedAbstractParent.mjs} (83%) rename chrome/content/zotero/actors/{MendeleyAuthChild.jsm => MendeleyAuthChild.mjs} (79%) rename chrome/content/zotero/actors/{MendeleyAuthParent.jsm => MendeleyAuthParent.mjs} (70%) rename chrome/content/zotero/actors/{PageDataChild.jsm => PageDataChild.mjs} (90%) rename chrome/content/zotero/actors/{SequoiaContextMenuChild.jsm => SequoiaContextMenuChild.mjs} (82%) rename chrome/content/zotero/actors/{SequoiaContextMenuParent.jsm => SequoiaContextMenuParent.mjs} (81%) rename chrome/content/zotero/actors/{SingleFileChild.jsm => SingleFileChild.mjs} (96%) rename chrome/content/zotero/actors/{TranslationChild.jsm => TranslationChild.mjs} (97%) rename chrome/content/zotero/actors/{TranslationParent.jsm => TranslationParent.mjs} (88%) rename chrome/content/zotero/actors/{ZoteroPrintChild.jsm => ZoteroPrintChild.mjs} (82%) rename chrome/content/zotero/actors/{ZoteroPrintParent.jsm => ZoteroPrintParent.mjs} (87%) diff --git a/chrome/content/zotero/RemoteTranslate.jsm b/chrome/content/zotero/RemoteTranslate.jsm index b6bd1bc88a..2902872507 100644 --- a/chrome/content/zotero/RemoteTranslate.jsm +++ b/chrome/content/zotero/RemoteTranslate.jsm @@ -25,15 +25,11 @@ var EXPORTED_SYMBOLS = ["RemoteTranslate"]; -ChromeUtils.import("chrome://zotero/content/actors/ActorManager.jsm"); ChromeUtils.defineESModuleGetters(this, { Zotero: "chrome://zotero/content/zotero.mjs", -}); - -const { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs"); -XPCOMUtils.defineLazyModuleGetters(this, { - TranslationManager: "chrome://zotero/content/actors/TranslationParent.jsm", - ZOTERO_CONFIG: "resource://zotero/config.js", + ZOTERO_CONFIG: "resource://zotero/config.mjs", + ActorManager: "chrome://zotero/content/actors/ActorManager.mjs", + TranslationManager: "chrome://zotero/content/actors/TranslationParent.mjs", }); class RemoteTranslate { diff --git a/chrome/content/zotero/actors/ActorManager.mjs b/chrome/content/zotero/actors/ActorManager.mjs index 8bf345a797..d4aa1576d2 100644 --- a/chrome/content/zotero/actors/ActorManager.mjs +++ b/chrome/content/zotero/actors/ActorManager.mjs @@ -1,35 +1,33 @@ // Register Mozilla actors import "resource://gre/modules/ActorManagerParent.sys.mjs"; -// TODO: Fx140: Migrate actors and re-enable -if(false) { ChromeUtils.registerWindowActor("PageData", { child: { - moduleURI: "chrome://zotero/content/actors/PageDataChild.jsm" + esModuleURI: "chrome://zotero/content/actors/PageDataChild.mjs" } }); ChromeUtils.registerWindowActor("SingleFile", { child: { - moduleURI: "chrome://zotero/content/actors/SingleFileChild.jsm" + esModuleURI: "chrome://zotero/content/actors/SingleFileChild.mjs" } }); ChromeUtils.registerWindowActor("Translation", { parent: { - moduleURI: "chrome://zotero/content/actors/TranslationParent.jsm" + esModuleURI: "chrome://zotero/content/actors/TranslationParent.mjs" }, child: { - moduleURI: "chrome://zotero/content/actors/TranslationChild.jsm" + esModuleURI: "chrome://zotero/content/actors/TranslationChild.mjs" } }); ChromeUtils.registerWindowActor("FeedAbstract", { parent: { - moduleURI: "chrome://zotero/content/actors/FeedAbstractParent.jsm", + esModuleURI: "chrome://zotero/content/actors/FeedAbstractParent.mjs", }, child: { - moduleURI: "chrome://zotero/content/actors/FeedAbstractChild.jsm", + esModuleURI: "chrome://zotero/content/actors/FeedAbstractChild.mjs", events: { DOMDocElementInserted: {}, } @@ -39,10 +37,10 @@ ChromeUtils.registerWindowActor("FeedAbstract", { ChromeUtils.registerWindowActor("ZoteroPrint", { parent: { - moduleURI: "chrome://zotero/content/actors/ZoteroPrintParent.jsm" + esModuleURI: "chrome://zotero/content/actors/ZoteroPrintParent.mjs" }, child: { - moduleURI: "chrome://zotero/content/actors/ZoteroPrintChild.jsm", + esModuleURI: "chrome://zotero/content/actors/ZoteroPrintChild.mjs", events: { pageshow: {} } @@ -52,10 +50,10 @@ ChromeUtils.registerWindowActor("ZoteroPrint", { ChromeUtils.registerWindowActor("ExternalLinkHandler", { parent: { - moduleURI: "chrome://zotero/content/actors/ExternalLinkHandlerParent.jsm", + esModuleURI: "chrome://zotero/content/actors/ExternalLinkHandlerParent.mjs", }, child: { - moduleURI: "chrome://zotero/content/actors/ExternalLinkHandlerChild.jsm", + esModuleURI: "chrome://zotero/content/actors/ExternalLinkHandlerChild.mjs", events: { click: {}, } @@ -68,10 +66,10 @@ ChromeUtils.registerWindowActor("ExternalLinkHandler", { if (AppConstants.platform === "macosx") { ChromeUtils.registerWindowActor("SequoiaContextMenu", { parent: { - moduleURI: "chrome://zotero/content/actors/SequoiaContextMenuParent.jsm", + esModuleURI: "chrome://zotero/content/actors/SequoiaContextMenuParent.mjs", }, child: { - moduleURI: "chrome://zotero/content/actors/SequoiaContextMenuChild.jsm", + esModuleURI: "chrome://zotero/content/actors/SequoiaContextMenuChild.mjs", }, allFrames: true, includeChrome: true @@ -80,16 +78,15 @@ if (AppConstants.platform === "macosx") { ChromeUtils.registerWindowActor("MendeleyAuth", { parent: { - moduleURI: "chrome://zotero/content/actors/MendeleyAuthParent.jsm" + esModuleURI: "chrome://zotero/content/actors/MendeleyAuthParent.mjs" }, child: { - moduleURI: "chrome://zotero/content/actors/MendeleyAuthChild.jsm" + esModuleURI: "chrome://zotero/content/actors/MendeleyAuthChild.mjs" } }); ChromeUtils.registerWindowActor("DocumentIsReady", { child: { - moduleURI: "chrome://zotero/content/actors/DocumentIsReadyChild.jsm" + esModuleURI: "chrome://zotero/content/actors/DocumentIsReadyChild.mjs" } }); -} diff --git a/chrome/content/zotero/actors/DocumentIsReadyChild.jsm b/chrome/content/zotero/actors/DocumentIsReadyChild.mjs similarity index 50% rename from chrome/content/zotero/actors/DocumentIsReadyChild.jsm rename to chrome/content/zotero/actors/DocumentIsReadyChild.mjs index 1fbada1097..bc5a9d1d76 100644 --- a/chrome/content/zotero/actors/DocumentIsReadyChild.jsm +++ b/chrome/content/zotero/actors/DocumentIsReadyChild.mjs @@ -1,8 +1,6 @@ -var EXPORTED_SYMBOLS = ["DocumentIsReadyChild"]; +import { documentIsReady } from "chrome://zotero/content/actors/actorUtils.mjs"; -let { documentIsReady } = ChromeUtils.importESModule("chrome://zotero/content/actors/actorUtils.mjs"); - -class DocumentIsReadyChild extends JSWindowActorChild { +export class DocumentIsReadyChild extends JSWindowActorChild { async receiveMessage({ name, data }) { if (name !== "waitForDocument") { return null; diff --git a/chrome/content/zotero/actors/ExternalLinkHandlerChild.jsm b/chrome/content/zotero/actors/ExternalLinkHandlerChild.mjs similarity index 91% rename from chrome/content/zotero/actors/ExternalLinkHandlerChild.jsm rename to chrome/content/zotero/actors/ExternalLinkHandlerChild.mjs index 7e1cd4e586..9b0548c607 100644 --- a/chrome/content/zotero/actors/ExternalLinkHandlerChild.jsm +++ b/chrome/content/zotero/actors/ExternalLinkHandlerChild.mjs @@ -1,7 +1,4 @@ -var EXPORTED_SYMBOLS = ["ExternalLinkHandlerChild"]; - - -class ExternalLinkHandlerChild extends JSWindowActorChild { +export class ExternalLinkHandlerChild extends JSWindowActorChild { async handleEvent(event) { switch (event.type) { case "click": { @@ -41,7 +38,7 @@ class ExternalLinkHandlerChild extends JSWindowActorChild { } let currentURL = this.contentWindow.location; - // eslint-disable-next-line no-script-url + if (hrefURL.protocol === 'javascript:') { // Link executes a script: open internally return true; diff --git a/chrome/content/zotero/actors/ExternalLinkHandlerParent.jsm b/chrome/content/zotero/actors/ExternalLinkHandlerParent.mjs similarity index 66% rename from chrome/content/zotero/actors/ExternalLinkHandlerParent.jsm rename to chrome/content/zotero/actors/ExternalLinkHandlerParent.mjs index 9c94642dac..394d495065 100644 --- a/chrome/content/zotero/actors/ExternalLinkHandlerParent.jsm +++ b/chrome/content/zotero/actors/ExternalLinkHandlerParent.mjs @@ -1,10 +1,8 @@ -var EXPORTED_SYMBOLS = ["ExternalLinkHandlerParent"]; - ChromeUtils.defineESModuleGetters(this, { Zotero: "chrome://zotero/content/zotero.mjs" }); -class ExternalLinkHandlerParent extends JSWindowActorParent { +export class ExternalLinkHandlerParent extends JSWindowActorParent { async receiveMessage({ name, data }) { switch (name) { case "launchURL": { diff --git a/chrome/content/zotero/actors/FeedAbstractChild.jsm b/chrome/content/zotero/actors/FeedAbstractChild.mjs similarity index 93% rename from chrome/content/zotero/actors/FeedAbstractChild.jsm rename to chrome/content/zotero/actors/FeedAbstractChild.mjs index babb4ab096..7207a6b82c 100644 --- a/chrome/content/zotero/actors/FeedAbstractChild.jsm +++ b/chrome/content/zotero/actors/FeedAbstractChild.mjs @@ -1,6 +1,4 @@ -var EXPORTED_SYMBOLS = ["FeedAbstractChild"]; - -class FeedAbstractChild extends JSWindowActorChild { +export class FeedAbstractChild extends JSWindowActorChild { _stylesheet; _stylesheetPromise; diff --git a/chrome/content/zotero/actors/FeedAbstractParent.jsm b/chrome/content/zotero/actors/FeedAbstractParent.mjs similarity index 83% rename from chrome/content/zotero/actors/FeedAbstractParent.jsm rename to chrome/content/zotero/actors/FeedAbstractParent.mjs index e1f16eb228..c6470371e6 100644 --- a/chrome/content/zotero/actors/FeedAbstractParent.jsm +++ b/chrome/content/zotero/actors/FeedAbstractParent.mjs @@ -1,10 +1,8 @@ -var EXPORTED_SYMBOLS = ["FeedAbstractParent"]; - ChromeUtils.defineESModuleGetters(this, { Zotero: "chrome://zotero/content/zotero.mjs" }); -class FeedAbstractParent extends JSWindowActorParent { +export class FeedAbstractParent extends JSWindowActorParent { async receiveMessage({ name, data }) { switch (name) { case "getStylesheet": { diff --git a/chrome/content/zotero/actors/MendeleyAuthChild.jsm b/chrome/content/zotero/actors/MendeleyAuthChild.mjs similarity index 79% rename from chrome/content/zotero/actors/MendeleyAuthChild.jsm rename to chrome/content/zotero/actors/MendeleyAuthChild.mjs index 0a863c522a..0d1d5ea635 100644 --- a/chrome/content/zotero/actors/MendeleyAuthChild.jsm +++ b/chrome/content/zotero/actors/MendeleyAuthChild.mjs @@ -1,10 +1,8 @@ /* global JSWindowActorChild:false */ -var EXPORTED_SYMBOLS = ["MendeleyAuthChild"]; // eslint-disable-line no-unused-vars +import { documentIsReady } from "chrome://zotero/content/actors/actorUtils.mjs"; -let { documentIsReady } = ChromeUtils.importESModule("chrome://zotero/content/actors/actorUtils.mjs"); - -class MendeleyAuthChild extends JSWindowActorChild { // eslint-disable-line no-unused-vars +export class MendeleyAuthChild extends JSWindowActorChild { async receiveMessage(message) { let document = this.document; diff --git a/chrome/content/zotero/actors/MendeleyAuthParent.jsm b/chrome/content/zotero/actors/MendeleyAuthParent.mjs similarity index 70% rename from chrome/content/zotero/actors/MendeleyAuthParent.jsm rename to chrome/content/zotero/actors/MendeleyAuthParent.mjs index 70d2b63d6e..8bc57b41e3 100644 --- a/chrome/content/zotero/actors/MendeleyAuthParent.jsm +++ b/chrome/content/zotero/actors/MendeleyAuthParent.mjs @@ -1,12 +1,10 @@ /* global JSWindowActorParent:false */ -var EXPORTED_SYMBOLS = ["MendeleyAuthParent"]; // eslint-disable-line no-unused-vars - ChromeUtils.defineESModuleGetters(this, { Zotero: "chrome://zotero/content/zotero.mjs" -}); +}); -class MendeleyAuthParent extends JSWindowActorParent { // eslint-disable-line no-unused-vars +export class MendeleyAuthParent extends JSWindowActorParent { async receiveMessage({ name, data }) { switch (name) { case "debug": { diff --git a/chrome/content/zotero/actors/PageDataChild.jsm b/chrome/content/zotero/actors/PageDataChild.mjs similarity index 90% rename from chrome/content/zotero/actors/PageDataChild.jsm rename to chrome/content/zotero/actors/PageDataChild.mjs index 89716d948b..04ac68f412 100644 --- a/chrome/content/zotero/actors/PageDataChild.jsm +++ b/chrome/content/zotero/actors/PageDataChild.mjs @@ -1,8 +1,6 @@ -var EXPORTED_SYMBOLS = ["PageDataChild"]; +import { documentIsReady } from "chrome://zotero/content/actors/actorUtils.mjs"; -let { documentIsReady } = ChromeUtils.importESModule("chrome://zotero/content/actors/actorUtils.mjs"); - -class PageDataChild extends JSWindowActorChild { +export class PageDataChild extends JSWindowActorChild { async receiveMessage(message) { // Special case for loadURI: don't wait for document to be ready, // since we haven't loaded anything yet diff --git a/chrome/content/zotero/actors/SequoiaContextMenuChild.jsm b/chrome/content/zotero/actors/SequoiaContextMenuChild.mjs similarity index 82% rename from chrome/content/zotero/actors/SequoiaContextMenuChild.jsm rename to chrome/content/zotero/actors/SequoiaContextMenuChild.mjs index 1b2b7d2d52..1cedcd89c1 100644 --- a/chrome/content/zotero/actors/SequoiaContextMenuChild.jsm +++ b/chrome/content/zotero/actors/SequoiaContextMenuChild.mjs @@ -1,12 +1,10 @@ -var { getTargetElement, createContextMenuEvent } = ChromeUtils.importESModule("chrome://zotero/content/contextMenuUtils.sys.mjs"); - -var EXPORTED_SYMBOLS = ["SequoiaContextMenuChild"]; +import { getTargetElement, createContextMenuEvent } from "chrome://zotero/content/contextMenuUtils.sys.mjs"; /** * Child-frame implementation of macOS Sequoia Ctrl-Enter context menu behavior. * See platformKeys.js for the chrome implementation. */ -class SequoiaContextMenuChild extends JSWindowActorChild { +export class SequoiaContextMenuChild extends JSWindowActorChild { async receiveMessage({ name }) { switch (name) { case "handleContextMenuEvent": { diff --git a/chrome/content/zotero/actors/SequoiaContextMenuParent.jsm b/chrome/content/zotero/actors/SequoiaContextMenuParent.mjs similarity index 81% rename from chrome/content/zotero/actors/SequoiaContextMenuParent.jsm rename to chrome/content/zotero/actors/SequoiaContextMenuParent.mjs index 0a9e43bc12..7cd1194664 100644 --- a/chrome/content/zotero/actors/SequoiaContextMenuParent.jsm +++ b/chrome/content/zotero/actors/SequoiaContextMenuParent.mjs @@ -1,6 +1,4 @@ -var EXPORTED_SYMBOLS = ["SequoiaContextMenuParent"]; - -class SequoiaContextMenuParent extends JSWindowActorParent { +export class SequoiaContextMenuParent extends JSWindowActorParent { async receiveMessage({ name, data }) { switch (name) { case "openContextMenuAtScreen": { diff --git a/chrome/content/zotero/actors/SingleFileChild.jsm b/chrome/content/zotero/actors/SingleFileChild.mjs similarity index 96% rename from chrome/content/zotero/actors/SingleFileChild.jsm rename to chrome/content/zotero/actors/SingleFileChild.mjs index d61e8c07b2..7839a784cf 100644 --- a/chrome/content/zotero/actors/SingleFileChild.jsm +++ b/chrome/content/zotero/actors/SingleFileChild.mjs @@ -1,8 +1,6 @@ -var EXPORTED_SYMBOLS = ["SingleFileChild"]; +import { documentIsReady } from "chrome://zotero/content/actors/actorUtils.mjs"; -let { documentIsReady } = ChromeUtils.importESModule("chrome://zotero/content/actors/actorUtils.mjs"); - -class SingleFileChild extends JSWindowActorChild { +export class SingleFileChild extends JSWindowActorChild { async receiveMessage(message) { let window = this.contentWindow; diff --git a/chrome/content/zotero/actors/TranslationChild.jsm b/chrome/content/zotero/actors/TranslationChild.mjs similarity index 97% rename from chrome/content/zotero/actors/TranslationChild.jsm rename to chrome/content/zotero/actors/TranslationChild.mjs index 6f60e61828..aa0be4050d 100644 --- a/chrome/content/zotero/actors/TranslationChild.jsm +++ b/chrome/content/zotero/actors/TranslationChild.mjs @@ -1,6 +1,4 @@ -var EXPORTED_SYMBOLS = ["TranslationChild"]; - -let { documentIsReady } = ChromeUtils.importESModule("chrome://zotero/content/actors/actorUtils.mjs"); +import { documentIsReady } from "chrome://zotero/content/actors/actorUtils.mjs"; const TRANSLATE_SCRIPT_PATHS = [ 'src/zotero.js', @@ -40,7 +38,7 @@ const OTHER_SCRIPT_URIS = [ 'chrome://zotero/content/actors/translation/translate_item.js', ]; -class TranslationChild extends JSWindowActorChild { +export class TranslationChild extends JSWindowActorChild { _sandbox = null; async receiveMessage(message) { @@ -161,11 +159,11 @@ class TranslationChild extends JSWindowActorChild { _makeTranslatorProvider(id) { let { Zotero } = this._sandbox; - let makeProxy = method => ( + let makeProxy = method => (...args) => this._sandbox.Promise.resolve( this.sendQuery('Translators:call', { id, method, args }) ).then(result => Cu.cloneInto(result, this._sandbox)) - ); + ; return Cu.cloneInto({ ...Zotero.Translators, get: makeProxy('get'), diff --git a/chrome/content/zotero/actors/TranslationParent.jsm b/chrome/content/zotero/actors/TranslationParent.mjs similarity index 88% rename from chrome/content/zotero/actors/TranslationParent.jsm rename to chrome/content/zotero/actors/TranslationParent.mjs index b30f49a7a2..2879eacc8c 100644 --- a/chrome/content/zotero/actors/TranslationParent.jsm +++ b/chrome/content/zotero/actors/TranslationParent.mjs @@ -1,8 +1,6 @@ -var EXPORTED_SYMBOLS = ["TranslationParent", "TranslationManager"]; +import { Zotero } from "chrome://zotero/content/zotero.mjs"; -var { Zotero } = ChromeUtils.importESModule("chrome://zotero/content/zotero.mjs"); - -const TranslationManager = new class { +export const TranslationManager = new (class { _registeredRemoteTranslates = new Map(); add(id, remoteTranslate) { @@ -62,9 +60,9 @@ const TranslationManager = new class { } return returnValue; } -}; +}); -class TranslationParent extends JSWindowActorParent { +export class TranslationParent extends JSWindowActorParent { async receiveMessage(message) { let { name, data } = message; switch (name) { diff --git a/chrome/content/zotero/actors/ZoteroPrintChild.jsm b/chrome/content/zotero/actors/ZoteroPrintChild.mjs similarity index 82% rename from chrome/content/zotero/actors/ZoteroPrintChild.jsm rename to chrome/content/zotero/actors/ZoteroPrintChild.mjs index 7957943995..c6880b74f6 100644 --- a/chrome/content/zotero/actors/ZoteroPrintChild.jsm +++ b/chrome/content/zotero/actors/ZoteroPrintChild.mjs @@ -1,7 +1,4 @@ -var EXPORTED_SYMBOLS = ["ZoteroPrintChild"]; - - -class ZoteroPrintChild extends JSWindowActorChild { +export class ZoteroPrintChild extends JSWindowActorChild { actorCreated() { Cu.exportFunction( options => new this.contentWindow.Promise( diff --git a/chrome/content/zotero/actors/ZoteroPrintParent.jsm b/chrome/content/zotero/actors/ZoteroPrintParent.mjs similarity index 87% rename from chrome/content/zotero/actors/ZoteroPrintParent.jsm rename to chrome/content/zotero/actors/ZoteroPrintParent.mjs index 608155fa04..7ca43b774d 100644 --- a/chrome/content/zotero/actors/ZoteroPrintParent.jsm +++ b/chrome/content/zotero/actors/ZoteroPrintParent.mjs @@ -1,6 +1,4 @@ -var EXPORTED_SYMBOLS = ["ZoteroPrintParent"]; - -const { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs"); +import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; XPCOMUtils.defineLazyModuleGetters(this, { }); @@ -9,7 +7,7 @@ ChromeUtils.defineESModuleGetters(this, { Zotero: "chrome://zotero/content/zotero.mjs", }); -class ZoteroPrintParent extends JSWindowActorParent { +export class ZoteroPrintParent extends JSWindowActorParent { async receiveMessage({ name, data }) { switch (name) { case "zoteroPrint": {