keyboard.js: Fix typo regarding charcode mapping table
[conkeror.git] / modules / extensions / dom-inspector.js
blob8ae8efa6291888beaa35767da36e96522401cef0
1 require("window.js");
2 require("utils.js");
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.",
33             function (I) {
34                 function handler(e) {
35                     e.preventDefault();
36                     e.stopPropagation();
37                     inspect_dom_node(e.target);
38                     I.window.removeEventListener("click", handler);
39                 }
40                 I.window.addEventListener("click", handler, true);
41                 I.minibuffer.message("Click in this window to select the DOM node to inspect.");
42             });