tab.js (1448B)
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 generateActorSpec, 8 Option, 9 Arg, 10 RetVal, 11 } = require("resource://devtools/shared/protocol.js"); 12 13 const tabDescriptorSpec = generateActorSpec({ 14 typeName: "tabDescriptor", 15 16 methods: { 17 getTarget: { 18 request: {}, 19 response: { 20 frame: RetVal("json"), 21 }, 22 }, 23 getFavicon: { 24 request: {}, 25 response: { 26 favicon: RetVal("string"), 27 }, 28 }, 29 getWatcher: { 30 request: { 31 isServerTargetSwitchingEnabled: Option(0, "boolean"), 32 isPopupDebuggingEnabled: Option(0, "boolean"), 33 }, 34 response: RetVal("watcher"), 35 }, 36 // Added in Firefox 140 37 navigateTo: { 38 request: { 39 url: Arg(0, "string"), 40 waitForLoad: Arg(1, "boolean"), 41 }, 42 response: {}, 43 }, 44 // Added in Firefox 140 45 goBack: { 46 request: {}, 47 response: {}, 48 }, 49 // Added in Firefox 140 50 goForward: { 51 request: {}, 52 response: {}, 53 }, 54 reloadDescriptor: { 55 request: { 56 bypassCache: Option(0, "boolean"), 57 }, 58 response: {}, 59 }, 60 }, 61 62 events: { 63 "descriptor-destroyed": { 64 type: "descriptor-destroyed", 65 }, 66 }, 67 }); 68 69 exports.tabDescriptorSpec = tabDescriptorSpec;