2 * (C) Copyright 2008 Jeremy Maitin-Shepard
4 * Use, modification, and distribution are subject to the terms specified in the
11 if (!extension_is_enabled("inspector@mozilla.org"))
12 throw skip_module_load;
14 function open_dom_inspector() {
15 make_chrome_window("chrome://inspector/content/");
18 function inspect_dom_document(document) {
19 make_chrome_window("chrome://inspector/content/", document);
22 function inspect_dom_node(node) {
23 make_chrome_window("chrome://inspector/content/", node);
26 function inspect_javascript_object(obj) {
27 make_chrome_window("chrome://inspector/content/object.xul", obj);
30 interactive("inspector", "Open the DOM Inspector in a new window.",
31 function (I) { open_dom_inspector(); });
33 interactive("inspect-chrome", "Inspect the chrome document for the current Conkeror window.",
34 function (I) {inspect_dom_document(I.window.document);});
36 interactive("inspect-page", "Inspect the current content document.",
37 function (I) {inspect_dom_document(I.buffer.document);});
39 interactive("inspect-click", "Inspect the target of the next mouse click.",
41 var window = I.window;
45 window.removeEventListener("click", arguments.callee, true);
46 inspect_dom_node(e.target);
48 window.addEventListener("click", handler, true);
49 I.minibuffer.message("Click in this window to select the DOM node to inspect.");