addons.js (743B)
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 Arg, 8 RetVal, 9 generateActorSpec, 10 } = require("resource://devtools/shared/protocol.js"); 11 12 const addonsSpec = generateActorSpec({ 13 typeName: "addons", 14 15 methods: { 16 installTemporaryAddon: { 17 request: { 18 addonPath: Arg(0, "string"), 19 openDevTools: Arg(1, "nullable:boolean"), 20 }, 21 response: { addon: RetVal("json") }, 22 }, 23 24 uninstallAddon: { 25 request: { 26 addonId: Arg(0, "string"), 27 }, 28 response: {}, 29 }, 30 }, 31 }); 32 33 exports.addonsSpec = addonsSpec;