GenAIParent.sys.mjs (606B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 const lazy = {}; 6 ChromeUtils.defineESModuleGetters(lazy, { 7 GenAI: "resource:///modules/GenAI.sys.mjs", 8 }); 9 10 /** 11 * JSWindowActor to pass data between GenAI singleton and content pages. 12 */ 13 export class GenAIParent extends JSWindowActorParent { 14 receiveMessage({ data, name }) { 15 lazy.GenAI.handleShortcutsMessage( 16 name, 17 data, 18 this.browsingContext.topFrameElement 19 ); 20 } 21 }