mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
[PALEMOON] [DevTools] Fix a function "Inspect Element" (nsContextMenu.js)
Issue #102
This commit is contained in:
parent
8b48b8efaf
commit
b25d89ad75
1 changed files with 9 additions and 4 deletions
|
|
@ -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));
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue