tor-browser

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

target-configuration.js (1098B)


      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  FrontClassWithSpec,
      9  registerFront,
     10 } = require("resource://devtools/shared/protocol.js");
     11 const {
     12  targetConfigurationSpec,
     13 } = require("resource://devtools/shared/specs/target-configuration.js");
     14 
     15 /**
     16 * The TargetConfigurationFront/Actor should be used to populate the DevTools server
     17 * with settings read from the client side but which impact the server.
     18 * For instance, "disable cache" is a feature toggled via DevTools UI (client),
     19 * but which should be communicated to the targets (server).
     20 *
     21 * See the TargetConfigurationActor for a list of supported configuration options.
     22 */
     23 class TargetConfigurationFront extends FrontClassWithSpec(
     24  targetConfigurationSpec
     25 ) {
     26  form(json) {
     27    // Read the initial configuration.
     28    this.initialConfiguration = json.configuration;
     29    this.traits = json.traits;
     30  }
     31 }
     32 
     33 registerFront(TargetConfigurationFront);