tor-browser

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

command.sys.mjs (763B)


      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 { Module } from "chrome://remote/content/shared/messagehandler/Module.sys.mjs";
      6 
      7 class CommandModule extends Module {
      8  destroy() {}
      9 
     10  /**
     11   * Commands
     12   */
     13 
     14  testRootModule() {
     15    return "root-value";
     16  }
     17 
     18  testMissingIntermediaryMethod(params, destination) {
     19    // Spawn a new internal command, but with a commandName which doesn't match
     20    // any method.
     21    return this.messageHandler.handleCommand({
     22      moduleName: "command",
     23      commandName: "missingMethod",
     24      destination,
     25    });
     26  }
     27 }
     28 
     29 export const command = CommandModule;