GeckoViewPromptChild.sys.mjs (833B)
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 import { GeckoViewActorChild } from "resource://gre/modules/GeckoViewActorChild.sys.mjs"; 6 7 export class GeckoViewPromptChild extends GeckoViewActorChild { 8 handleEvent(event) { 9 const { type } = event; 10 debug`handleEvent: ${type}`; 11 12 switch (type) { 13 case "MozOpenDateTimePicker": 14 case "mozshowdropdown": 15 case "mozshowdropdown-sourcetouch": 16 case "click": 17 case "contextmenu": 18 case "DOMPopupBlocked": 19 case "DOMRedirectBlocked": 20 Services.prompt.wrappedJSObject.handleEvent(event); 21 } 22 } 23 } 24 25 const { debug, warn } = GeckoViewPromptChild.initLogging("GeckoViewPrompt");