Last active
December 16, 2015 14:19
Open a Firefox devtools window that's debugging the devtools window that's debugging the currently selected tab.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Running this scratchpad in chrome mode will open a devtools window that's debugging | |
* the devtools window that's debugging the currently selected tab. | |
*/ | |
let {devtools} = Components.utils.import("resource:///modules/devtools/gDevTools.jsm", {}); | |
let tabTarget = devtools.TargetFactory.forTab(gBrowser.selectedTab); | |
let toolbox = gDevTools.getToolbox(tabTarget); | |
let win = toolbox._host.frame.contentWindow; | |
let target = devtools.TargetFactory.forWindow(win); | |
let toolbox = gDevTools.showToolbox(target, "styleeditor", "window"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In nightly, can run this command by: