target-configuration.js (1503B)
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 "use strict"; 6 7 const { 8 generateActorSpec, 9 Arg, 10 RetVal, 11 types, 12 } = require("resource://devtools/shared/protocol.js"); 13 14 types.addDictType("target-configuration.configuration", { 15 cacheDisabled: "nullable:boolean", 16 colorSchemeSimulation: "nullable:string", 17 customFormatters: "nullable:boolean", 18 customUserAgent: "nullable:string", 19 javascriptEnabled: "nullable:boolean", 20 overrideDPPX: "nullable:number", 21 printSimulationEnabled: "nullable:boolean", 22 rdmPaneOrientation: "nullable:json", 23 reloadOnTouchSimulationToggle: "nullable:boolean", 24 restoreFocus: "nullable:boolean", 25 serviceWorkersTestingEnabled: "nullable:boolean", 26 setTabOffline: "nullable:boolean", 27 touchEventsOverride: "nullable:string", 28 isTracerFeatureEnabled: "nullable:boolean", 29 }); 30 31 const targetConfigurationSpec = generateActorSpec({ 32 typeName: "target-configuration", 33 34 methods: { 35 updateConfiguration: { 36 request: { 37 configuration: Arg(0, "target-configuration.configuration"), 38 }, 39 response: { 40 configuration: RetVal("target-configuration.configuration"), 41 }, 42 }, 43 isJavascriptEnabled: { 44 request: {}, 45 response: { 46 javascriptEnabled: RetVal("boolean"), 47 }, 48 }, 49 }, 50 }); 51 52 exports.targetConfigurationSpec = targetConfigurationSpec;