toolbox.js (1170B)
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 /** 6 * @memberof actions/toolbox 7 * @static 8 */ 9 export function openLink(url) { 10 return async function ({ panel }) { 11 return panel.openLink(url); 12 }; 13 } 14 15 export function openSourceMap(url, line, column) { 16 return async function ({ panel }) { 17 return panel.toolbox.viewSource(url, line, column); 18 }; 19 } 20 21 export function evaluateInConsole(inputString) { 22 return async ({ panel }) => { 23 return panel.openConsoleAndEvaluate(inputString); 24 }; 25 } 26 27 export function openElementInInspectorCommand(grip) { 28 return async ({ panel }) => { 29 return panel.openElementInInspector(grip); 30 }; 31 } 32 33 export function openInspector() { 34 return async ({ panel }) => { 35 return panel.openInspector(); 36 }; 37 } 38 39 export function highlightDomElement(grip) { 40 return async ({ panel }) => { 41 return panel.highlightDomElement(grip); 42 }; 43 } 44 45 export function unHighlightDomElement(grip) { 46 return async ({ panel }) => { 47 return panel.unHighlightDomElement(grip); 48 }; 49 }