Skip to content

Instantly share code, notes, and snippets.

@grssam
Created February 15, 2013 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grssam/4963619 to your computer and use it in GitHub Desktop.
Save grssam/4963619 to your computer and use it in GitHub Desktop.
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