2 * (C) Copyright 2008 Jeremy Maitin-Shepard
4 * Use, modification, and distribution are subject to the terms specified in the
8 function open_dom_inspector () {
9 make_chrome_window("chrome://inspector/content/");
12 function inspect_dom_document (document) {
13 make_chrome_window("chrome://inspector/content/", document);
16 function inspect_dom_node (node) {
17 make_chrome_window("chrome://inspector/content/", node);
20 function inspect_javascript_object (obj) {
21 make_chrome_window("chrome://inspector/content/object.xul", obj);
24 interactive("inspector",
25 "Open the DOM Inspector in a new window.",
28 interactive("inspect-chrome",
29 "Inspect the chrome document for the current Conkeror window.",
30 function (I) { inspect_dom_document(I.window.document); });
32 interactive("inspect-page",
33 "Inspect the current content document.",
34 function (I) { inspect_dom_document(I.buffer.document); });
36 interactive("inspect-click",
37 "Inspect the target of the next mouse click.",
39 var window = I.window;
40 function handler (e) {
43 window.removeEventListener("click", arguments.callee, true);
44 inspect_dom_node(e.target);
46 window.addEventListener("click", handler, true);
47 I.minibuffer.message("Click in this window to select the DOM node to inspect.");
50 provide("dom-inspector");