Bug 1891710: part 2) Enable <Element-outerHTML.html> WPT for Trusted Types. r=smaug
[gecko.git] / devtools / shared / specs / style-sheets.js
blob94d3e72f5f71b6d188743c9dde742f702c176a5b
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";
6 const {
7   Arg,
8   RetVal,
9   generateActorSpec,
10 } = require("resource://devtools/shared/protocol.js");
12 const styleSheetsSpec = generateActorSpec({
13   typeName: "stylesheets",
15   events: {},
17   methods: {
18     getTraits: {
19       request: {},
20       response: { traits: RetVal("json") },
21     },
22     addStyleSheet: {
23       request: {
24         text: Arg(0, "string"),
25         fileName: Arg(1, "nullable:string"),
26       },
27       response: {},
28     },
29     toggleDisabled: {
30       request: { resourceId: Arg(0, "string") },
31       response: { disabled: RetVal("boolean") },
32     },
33     getText: {
34       request: { resourceId: Arg(0, "string") },
35       response: { text: RetVal("longstring") },
36     },
37     update: {
38       request: {
39         resourceId: Arg(0, "string"),
40         text: Arg(1, "string"),
41         transition: Arg(2, "boolean"),
42         cause: Arg(3, "nullable:string"),
43       },
44       response: {},
45     },
46   },
47 });
49 exports.styleSheetsSpec = styleSheetsSpec;