Closed Bug 277323 Opened 21 years ago Closed 7 years ago

DOM Nodes viewer: Show node in source code

Categories

(Other Applications :: DOM Inspector, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: WeirdAl, Unassigned)

Details

It'd be rather useful to be able to show where in a document's source code a node resides. Current thinking: Add a context menu item for dom.xul labeled, "Show node in source code". This would reach into a window Inspector controls (we'd create it if needed), serialize the node's owner document and display it, and then select/highlight the node's serialized content within that new window. We have to make sure we highlight the right node (where there may be another node earlier in the document which has identical content, pretty easy to have happen with whitespace text nodes), so some DOM advice would be helpful (XPath?). We already have Copy XML, so that might make it easier. Feedback welcomed.
maybe like view selection source?
Reassigning DOM-I bugs which have stagnated in my buglist back to default owner. Hopefully someone will pick up some of these bugs and work on them. I'll continue to follow them.
Assignee: ajvincent → dom-inspector
Version: unspecified → Trunk
Instead of showing the complete source and highlighting the code in another window, I think it would be more useful to simply serialize the currently selected node and display on the right side as another view (like what's currently done with text nodes). Also like text nodes, we could allow editing of the source code (yay) by serializing the result if changed and replacing the node. -We'd have to handle malformed code -Editing wouldn't work (and viewing would suck) if XMLExtras wasn't available. -We would lose any events or JavaScript set on the node we replace. Perhaps we could try to find the bits that changed rather than replace everything?
Assignee: dom-inspector → nobody
QA Contact: timeless → dom-inspector
Bulk close. This component is no longer supported or maintained. https://bugzilla.mozilla.org/show_bug.cgi?id=1499023
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Bulk close. This component is no longer supported or maintained. https://bugzilla.mozilla.org/show_bug.cgi?id=1499023
You need to log in before you can comment on or make changes to this bug.