summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content/nsContextMenu.js
diff options
context:
space:
mode:
authorNew Tobin Paradigm <email@mattatobin.com>2018-04-08 13:47:00 -0400
committerGitHub <noreply@github.com>2018-04-08 13:47:00 -0400
commitd009c9bcf247131be6d34ee89da951d0a06b401c (patch)
treeb8f41e09412766fb16847a06f408bd517ff1faa3 /application/palemoon/base/content/nsContextMenu.js
parent6ac47e95318efb654682ed774fbbde1eb0fa2dd3 (diff)
parent44a46fcdd1bb2e8c5838f84c85c8edebc616a41f (diff)
downloadUXP-d009c9bcf247131be6d34ee89da951d0a06b401c.tar
UXP-d009c9bcf247131be6d34ee89da951d0a06b401c.tar.gz
UXP-d009c9bcf247131be6d34ee89da951d0a06b401c.tar.lz
UXP-d009c9bcf247131be6d34ee89da951d0a06b401c.tar.xz
UXP-d009c9bcf247131be6d34ee89da951d0a06b401c.zip
Merge pull request #105 from janekptacijarabaci/pm_devtools_1
[PALEMOON] [DevTools] Added support for a new DevTools (basic settings)
Diffstat (limited to 'application/palemoon/base/content/nsContextMenu.js')
-rw-r--r--application/palemoon/base/content/nsContextMenu.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/application/palemoon/base/content/nsContextMenu.js b/application/palemoon/base/content/nsContextMenu.js
index 8e6bc96c2..f914f5841 100644
--- a/application/palemoon/base/content/nsContextMenu.js
+++ b/application/palemoon/base/content/nsContextMenu.js
@@ -422,12 +422,17 @@ nsContextMenu.prototype = {
},
inspectNode: function CM_inspectNode() {
- let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
+ let {devtools} = Cu.import("resource://devtools/shared/Loader.jsm", {});
let gBrowser = this.browser.ownerDocument.defaultView.gBrowser;
- let tt = devtools.TargetFactory.forTab(gBrowser.selectedTab);
- return gDevTools.showToolbox(tt, "inspector").then(function(toolbox) {
+ let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
+
+ return gDevTools.showToolbox(target, "inspector").then(function(toolbox) {
let inspector = toolbox.getCurrentPanel();
- inspector.selection.setNode(this.target, "browser-context-menu");
+
+ this.browser.messageManager.sendAsyncMessage("debug:inspect", {}, {node: this.target});
+ inspector.walker.findInspectingNode().then(nodeFront => {
+ inspector.selection.setNodeFront(nodeFront, "browser-context-menu");
+ });
}.bind(this));
},