4 if (!extension_is_enabled("inspector@mozilla.org"))
5 throw skip_module_load;
7 function open_dom_inspector() {
8 make_chrome_window("chrome://inspector/content/");
11 function inspect_dom_document(document) {
12 make_chrome_window("chrome://inspector/content/", document);
15 function inspect_dom_node(node) {
16 make_chrome_window("chrome://inspector/content/", node);
19 function inspect_javascript_object(obj) {
20 make_chrome_window("chrome://inspector/content/object.xul", obj);
23 interactive("inspector", "Open the DOM Inspector in a new window.",
24 function (I) {open_dom_inspector()});
26 interactive("inspect-chrome", "Inspect the chrome document for the current Conkeror window.",
27 function (I) {inspect_dom_document(I.window.document);});
29 interactive("inspect-page", "Inspect the current content document.",
30 function (I) {inspect_dom_document(I.buffer.document);});
32 interactive("inspect-click", "Inspect the target of the next mouse click.",
37 inspect_dom_node(e.target);
38 I.window.removeEventListener("click", handler);
40 I.window.addEventListener("click", handler, true);
41 I.minibuffer.message("Click in this window to select the DOM node to inspect.");