screenshot-content.js (805B)
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-content.args", { 14 fullpage: "nullable:boolean", 15 selector: "nullable:string", 16 nodeActorID: "nullable:number", 17 }); 18 19 const screenshotContentSpec = generateActorSpec({ 20 typeName: "screenshot-content", 21 22 methods: { 23 prepareCapture: { 24 request: { 25 args: Arg(0, "screenshot-content.args"), 26 }, 27 response: { 28 value: RetVal("json"), 29 }, 30 }, 31 }, 32 }); 33 34 exports.screenshotContentSpec = screenshotContentSpec;