Closed Bug 168730 Opened 23 years ago Closed 22 years ago

JavaScript function for invoking the DOM inspector

Categories

(Other Applications :: DOM Inspector, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED WONTFIX

People

(Reporter: nick, Assigned: caillon)

Details

It would be nice to have a "inspect(object)" function which would invoke the DOM inspector. This can be very nice for debugging. Examples: function eventHandler(event) { inspect(event) } .. or calling it from the URL bar... javascript:inspect(document.forms.something) .. or invoking it from the JS debugger console.
This might be better handled as a pseudo-protocol, such as chrome:// or javascript:// . Binding it to JavaScript only is not necessarily good policy. RFE is deprecated in favor of severity: enhancement.
Summary: [RFE] JavaScript function for invoking the DOM inspector → JavaScript function for invoking the DOM inspector
.
Assignee: hewitt → caillon
The global namespace in JavaScript is already overpopulated. The last thing we need is another identifier there. I realize your intent of having a convenient way to load inspector right up to a node, and I do think that would be cool. If you come up with a better suggestion (I'm not sure that a new protocol is the correct solution either), I would be glad to hear it. I have heard from someone on IRC that Phoenix has reinstated a contextmenu item which does something like "Inspect this Node" from the browser. Mozilla used to have that but it was removed for one reason or another. Anyway, we should be trying to _not_ add things to the global namespace. And especially not for an optional extension. Thus, wontfix.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
Why not create a global object to hold all non-standard Mozilla extensions? then... Mozilla.inspect(event) ... and the namespace could be cleaned so that every non-standard thing is there. Like the way it's done in CSS with the -moz- prefix. (uhm.. it would only work with global things... perhaps it could be a prefix like: event.mozExtInspect(). But it's a little uglier. ) Just some ideas, thanks for reading =).
The scope of those ideas are not within inspector's scope. File bugs in DOM Extensions if you like, but be prepared for it to be marked with a similar fate as this one.
v.
Status: RESOLVED → VERIFIED
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.