tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

webextension.js (1030B)


      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 "use strict";
      5 
      6 const {
      7  RetVal,
      8  generateActorSpec,
      9  Option,
     10 } = require("resource://devtools/shared/protocol.js");
     11 
     12 const webExtensionDescriptorSpec = generateActorSpec({
     13  typeName: "webExtensionDescriptor",
     14 
     15  methods: {
     16    reload: {
     17      request: {},
     18      response: { addon: RetVal("json") },
     19    },
     20 
     21    terminateBackgroundScript: {
     22      request: {},
     23      response: {},
     24    },
     25 
     26    reloadDescriptor: {
     27      request: {
     28        bypassCache: Option(0, "boolean"),
     29      },
     30      response: {},
     31    },
     32    getWatcher: {
     33      request: {
     34        isServerTargetSwitchingEnabled: Option(0, "boolean"),
     35      },
     36      response: RetVal("watcher"),
     37    },
     38  },
     39 
     40  events: {
     41    "descriptor-destroyed": {
     42      type: "descriptor-destroyed",
     43    },
     44  },
     45 });
     46 
     47 exports.webExtensionDescriptorSpec = webExtensionDescriptorSpec;