Bug 1891710: part 2) Enable <Element-outerHTML.html> WPT for Trusted Types. r=smaug
[gecko.git] / devtools / shared / specs / highlighters.js
blob94d437f797c09e3820c623fe75c557da3f3f899e
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 customHighlighterSpec = generateActorSpec({
13   typeName: "customhighlighter",
15   events: {
16     "highlighter-event": {
17       type: "highlighter-event",
18       data: Arg(0, "json"),
19     },
20   },
22   methods: {
23     release: {
24       release: true,
25     },
26     show: {
27       request: {
28         node: Arg(0, "nullable:domnode"),
29         options: Arg(1, "nullable:json"),
30       },
31       response: {
32         value: RetVal("nullable:boolean"),
33       },
34     },
35     hide: {
36       request: {},
37     },
38     finalize: {
39       oneway: true,
40     },
41   },
42 });
44 exports.customHighlighterSpec = customHighlighterSpec;