2 * (C) Copyright 2008 Jeremy Maitin-Shepard
4 * Use, modification, and distribution are subject to the terms specified in the
10 function open_dom_inspector () {
11 make_chrome_window("chrome://inspector/content/");
14 function inspect_dom_document (document) {
15 make_chrome_window("chrome://inspector/content/", document);
18 function inspect_dom_node (node) {
19 make_chrome_window("chrome://inspector/content/", node);
22 function inspect_javascript_object (obj) {
23 make_chrome_window("chrome://inspector/content/object.xul", obj);
26 interactive("inspector",
27 "Open the DOM Inspector in a new window.",
30 interactive("inspect-chrome",
31 "Inspect the chrome document for the current Conkeror window.",
32 function (I) { inspect_dom_document(I.window.document); });
34 interactive("inspect-page",
35 "Inspect the current content document.",
36 function (I) { inspect_dom_document(I.buffer.document); });
38 interactive("inspect-click",
39 "Inspect the target of the next mouse click.",
41 var window = I.window;
42 function handler (e) {
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.");
52 provide("dom-inspector");