diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-04-11 17:45:54 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-04-11 17:45:54 +0200 |
commit | 597fb9fbe387378185431e1900ebe6f05ca09fbf (patch) | |
tree | 6adbe3cfb37ec4fca51003633bea9334f4822be5 /application/palemoon/base/content/nsContextMenu.js | |
parent | eac3e641110ce26cae69a53bb5920c6d725392ec (diff) | |
parent | ac05ab923af8bc5b0c077fe3a271492af19dbea8 (diff) | |
download | UXP-597fb9fbe387378185431e1900ebe6f05ca09fbf.tar UXP-597fb9fbe387378185431e1900ebe6f05ca09fbf.tar.gz UXP-597fb9fbe387378185431e1900ebe6f05ca09fbf.tar.lz UXP-597fb9fbe387378185431e1900ebe6f05ca09fbf.tar.xz UXP-597fb9fbe387378185431e1900ebe6f05ca09fbf.zip |
Rebase on master
Diffstat (limited to 'application/palemoon/base/content/nsContextMenu.js')
-rw-r--r-- | application/palemoon/base/content/nsContextMenu.js | 13 |
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)); }, |