mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
6fd91a613d
* * * Bug 933727 - Update Developer Toolbar to use promises and split out GCLI; r=mratcliffe * * * Bug 933727 - Update GCLI tests to use Task.spawn; r=mratcliffe * * * Bug 933727 - Update the Inspector to use split out GCLI; r=pbrosset * * * Bug 933727 - Update style editor to use split out GCLI; r=harth * * * Bug 933727 - Update Debugger to use split out GCLI; r=past * * * Bug 933727 - Update Profiler/Tilt/Scratchpad to use split out GCLI; r=valueof --HG-- rename : browser/devtools/commandline/test/browser_cmd_pref.js => browser/devtools/commandline/test/browser_cmd_pref1.js rename : browser/devtools/commandline/test/browser_cmd_pref.js => browser/devtools/commandline/test/browser_cmd_pref2.js rename : browser/devtools/commandline/test/browser_gcli_cli.js => browser/devtools/commandline/test/browser_gcli_cli1.js rename : browser/devtools/commandline/test/browser_gcli_cli.js => browser/devtools/commandline/test/browser_gcli_cli2.js rename : browser/devtools/commandline/test/browser_gcli_completion.js => browser/devtools/commandline/test/browser_gcli_completion1.js rename : browser/devtools/commandline/test/browser_gcli_completion.js => browser/devtools/commandline/test/browser_gcli_completion2.js
39 lines
1.3 KiB
JavaScript
39 lines
1.3 KiB
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
|
this.EXPORTED_SYMBOLS = [ ];
|
|
|
|
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
|
XPCOMUtils.defineLazyModuleGetter(this, "gDevTools",
|
|
"resource:///modules/devtools/gDevTools.jsm");
|
|
|
|
const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
|
|
const gcli = devtools.require('gcli/index');
|
|
|
|
/**
|
|
* 'inspect' command
|
|
*/
|
|
gcli.addCommand({
|
|
name: "inspect",
|
|
description: gcli.lookup("inspectDesc"),
|
|
manual: gcli.lookup("inspectManual"),
|
|
params: [
|
|
{
|
|
name: "selector",
|
|
type: "node",
|
|
description: gcli.lookup("inspectNodeDesc"),
|
|
manual: gcli.lookup("inspectNodeManual")
|
|
}
|
|
],
|
|
exec: function Command_inspect(args, context) {
|
|
let gBrowser = context.environment.chromeDocument.defaultView.gBrowser;
|
|
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
|
|
|
|
return gDevTools.showToolbox(target, "inspector").then(function(toolbox) {
|
|
toolbox.getCurrentPanel().selection.setNode(args.selector, "gcli");
|
|
}.bind(this));
|
|
}
|
|
});
|