tor-browser

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

blackboxing.js (919B)


      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 "use strict";
      6 
      7 const {
      8  generateActorSpec,
      9  Arg,
     10  types,
     11 } = require("resource://devtools/shared/protocol.js");
     12 
     13 types.addDictType("blackboxing.position", {
     14  line: "number",
     15  column: "number",
     16 });
     17 
     18 types.addDictType("blackboxing.range", {
     19  start: "blackboxing.position",
     20  end: "blackboxing.position",
     21 });
     22 
     23 const blackboxingSpec = generateActorSpec({
     24  typeName: "blackboxing",
     25 
     26  methods: {
     27    blackbox: {
     28      request: {
     29        url: Arg(0, "string"),
     30        range: Arg(1, "array:blackboxing.range"),
     31      },
     32    },
     33    unblackbox: {
     34      request: {
     35        url: Arg(0, "string"),
     36        range: Arg(1, "array:blackboxing.range"),
     37      },
     38    },
     39  },
     40 });
     41 
     42 exports.blackboxingSpec = blackboxingSpec;