highlighters.js (920B)
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 customHighlighterSpec = generateActorSpec({ 13 typeName: "customhighlighter", 14 15 events: { 16 "highlighter-event": { 17 type: "highlighter-event", 18 data: Arg(0, "json"), 19 }, 20 }, 21 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 }); 43 44 exports.customHighlighterSpec = customHighlighterSpec;