Summary: | Web Inspector: attribute nodes don't get rendered in the console | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ojan Vafai <ojan> | ||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Joseph Pecoraro <joepeck> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | joepeck, pfeldman, timothy, yurys | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | OS X 10.5 | ||||||||||
Attachments: |
|
Thanks Ojan. Consider using the http://webkit.org/new-inspector-bug link, available on the Bugzilla "New Bug" page https://bugs.webkit.org/enter_bug.cgi Looks like we don't support just printing an attribute in WebInspector.ElementsTreeElement.prototype._nodeTitleInfo. It should be added. case Node.ATTRIBUTE_NODE is missing from that long switch. http://trac.webkit.org/browser/trunk/WebCore/inspector/front-end/ElementsTreeOutline.js#L1253 Created attachment 65672 [details]
[PATCH] Print Out Attributes
Extends the console-format test to test for attributes. Image up soon.
Created attachment 65674 [details]
[IMAGE] Results After Patch
Comment on attachment 65672 [details]
[PATCH] Print Out Attributes
Thanks for the test with this.
This is definitely an improvement, but it seems to me that we'd want to output an object in the same way we do with Elements so that you can inspect the attribute object. Is that possible? (In reply to comment #6) > This is definitely an improvement, but it seems to me that we'd want to output an object in the same way we do with Elements so that you can inspect the attribute object. Is that possible? I am not sure I understand the request. Could you clarify? (In reply to comment #6) > This is definitely an improvement, but it seems to me that we'd want to output > an object in the same way we do with Elements so that you can inspect the > attribute object. Is that possible? What more is there to inspect? The name / value are the important parts. Is there some more data we are missing? Also, if you do want to view everything use dir(). That will force a listing as an object tree, allowing you to see all properties / values / prototype chain. Ugh. Nevermind me. I just wasn't thinking straight. Committed r66282 M WebCore/ChangeLog M WebCore/inspector/front-end/ElementsTreeOutline.js M WebCore/inspector/front-end/DOMAgent.js M WebCore/inspector/InspectorDOMAgent.cpp M LayoutTests/inspector/console-format-expected.txt M LayoutTests/inspector/console-format.html M LayoutTests/ChangeLog r66282 = 67e7198a50637082bdc125592905a4afb8fdb9d1 (refs/remotes/trunk) http://trac.webkit.org/changeset/66282 |
Created attachment 65652 [details] screenshot Type "document.createAttribute('id')" into the console. You get a blank line. You should get a node like any other node.