Skip to content

Instantly share code, notes, and snippets.

@grssam
Created Feb 15, 2013
Embed
What would you like to do?
trying to select the doctype element
let tempScope = {};
Components.utils.import("resource:///modules/devtools/Target.jsm", tempScope);
let TargetFactory = tempScope.TargetFactory;
let target = TargetFactory.forTab(gBrowser.selectedTab);
gDevTools.showToolbox(target).then(function(toolbox) {
toolbox.selectTool("inspector").then(function(inspector) {
inspector.selection.setNode(window.content.document.doctype);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment