tor-browser

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

screenshot.js (834B)


      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  Arg,
      9  generateActorSpec,
     10  types,
     11 } = require("resource://devtools/shared/protocol.js");
     12 
     13 types.addDictType("screenshot.args", {
     14  fullpage: "nullable:boolean",
     15  file: "nullable:boolean",
     16  clipboard: "nullable:boolean",
     17  selector: "nullable:string",
     18  dpr: "nullable:string",
     19  delay: "nullable:string",
     20 });
     21 
     22 const screenshotSpec = generateActorSpec({
     23  typeName: "screenshot",
     24 
     25  methods: {
     26    capture: {
     27      request: {
     28        args: Arg(0, "screenshot.args"),
     29      },
     30      response: {
     31        value: RetVal("json"),
     32      },
     33    },
     34  },
     35 });
     36 
     37 exports.screenshotSpec = screenshotSpec;