Bug 1891710: part 2) Enable <Element-outerHTML.html> WPT for Trusted Types. r=smaug
[gecko.git] / mobile / android / actors / GeckoViewSettingsChild.sys.mjs
blobd5e6c01e272b7a508fc7d02c55f0244e24b70fdb
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/. */
5 import { GeckoViewActorChild } from "resource://gre/modules/GeckoViewActorChild.sys.mjs";
7 // Handles GeckoView content settings
8 export class GeckoViewSettingsChild extends GeckoViewActorChild {
9   receiveMessage(message) {
10     const { name } = message;
11     debug`receiveMessage: ${name}`;
13     switch (name) {
14       case "SettingsUpdate": {
15         const settings = message.data;
17         if (settings.isPopup) {
18           // Allow web extensions to close their own action popups (bz1612363)
19           this.contentWindow.windowUtils.allowScriptsToClose();
20         }
21       }
22     }
23   }
26 const { debug, warn } = GeckoViewSettingsChild.initLogging("GeckoViewSettings");