Summary: | Inspector: NodeLists Don't Display Well in the Console | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Joseph Pecoraro <joepeck> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | abarth, aroben, joepeck, kmccullough, pfeldman, sam, timothy | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Attachments: |
|
Description
Joseph Pecoraro
2009-08-06 21:33:43 PDT
Created attachment 34248 [details]
Showing Multiple Display Options for a NodeList
Here are three different ways to display the NodeList (Currently as a "function", as an "array", and as an "object"). Which do you like best?
I think array is best. Created attachment 34249 [details] Display NodeList like an Array Display like an array. Although this doesn't show the indexes, I still like this approach. Image: http://bogojoker.com/snaps/as_array.png Comment on attachment 34249 [details] Display NodeList like an Array Clearing review flag on attachment: 34249 Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/front-end/ConsoleView.js Committed r46886 M WebCore/ChangeLog M WebCore/inspector/front-end/ConsoleView.js r46886 = 608b85eaa5602133c0facc6c3ea320c176aa4bf5 (trunk) No changes between current HEAD and refs/remotes/trunk Resetting to the latest refs/remotes/trunk http://trac.webkit.org/changeset/46886 All reviewed patches have been landed. Closing bug. Should we do this for other array like structures such as HTMLCollection? Created attachment 40565 [details]
[PATCH] Display NodeList as an Array
Looks like this got lost in the Inspector Serialization.
Comment on attachment 34249 [details]
Display NodeList like an Array
Cleared Flags on old patch.
Created attachment 40566 [details]
[PATCH] Display NodeList as an Array
Better solution, more in line with the previous solution, thanks to guidance from pfeldman.
Comment on attachment 40565 [details] [PATCH] Display NodeList as an Array > + if (isProxy && output.description === "NodeList") > + type = "array"; This would trigger on a string with value == "NodeList". So you should no rely upon description. Instead, we could patch Object.type on the injected script side to pretend NodeList has an "array" type. (In reply to comment #9) > Created an attachment (id=40566) [details] > [PATCH] Display NodeList as an Array > > Better solution, more in line with the previous solution, thanks to guidance > from pfeldman. This patch looks good. Landed in http://trac.webkit.org/changeset/49298 r49298 = 74c5d0dca10afaf5f4886c5fcb48e80dd5e3612d (trunk) |