|Summary:||Ability to serialize an element subtree (into clipboard?) from the DOM inspector|
|Product:||WebKit||Reporter:||Eric Seidel (no email) <eric>|
|Component:||Web Inspector (Deprecated)||Assignee:||Timothy Hatcher <timothy>|
Description Eric Seidel (no email) 2006-12-31 20:03:14 PST
Comment 3 Mark Rowe (bdash) 2007-11-10 00:00:33 PST
Comment on attachment 17166 [details] Patch r=me with the comment clarification Alexey mentioned in #webkit.
Comment 4 Adam Roben (:aroben) 2007-11-10 00:03:21 PST
Comment on attachment 17166 [details] Patch + and it's subtree is copied to the clipboard. If the node has no Typo: it's -> its + var data = this.focusedDOMNode.outerHTML; + if (!data) + data = this.focusedDOMNode.nodeValue; You should be able to use || for this. + if (this.currentFocusElement.handleCopyEvent) + event.preventDefault(); + else if (this.currentFocusElement.id && this.currentFocusElement.id.length && WebInspector[this.currentFocusElement.id + "Copy"]) + event.preventDefault(); I think this would be clearer with || instead of else if, though I suppose this way the code is more similar to documentCopy. r=me
Comment 5 Timothy Hatcher 2007-11-10 00:06:36 PST
Comment 6 Alexey Proskuryakov 2007-11-10 13:10:06 PST
I've been playing with this feature to see if it lets one copy text from password fields (it apparently doesn't), and noticed a quirk - copying via a context menu gives different results than copying via a keyboard shortcut. E.g. when copying an input element from the tree, I just get "input".
Comment 7 Timothy Hatcher 2007-11-10 13:14:50 PST
Right clicking selects the word under the mouse. And since there is a selection, we allow the normal copy path. I guess we should make this smarter somehow, but it will be tricky.
Comment 8 Timothy Hatcher 2007-11-10 16:57:23 PST
The word being selected on right-click is actually in the breadcrumb, not right under the mouse!