[Webkit-unassigned] [Bug 25724] Incorrect collection output for Javascript console evaluation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 20 09:29:37 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=25724





------- Comment #5 from conradwt at gmail.com  2009-05-20 09:29 PDT -------
It seems that there are a lot of implementation details that are presented when
an array of objects is the result-set.  For example, using the google.com:

> var links = document.getElementsByTagName( 'a' )
=> undefined

> links
=> [object NodeList]

> links.length
=> 30

> links[0]
=> <a href=​"http:​/​/​images.google.com/​imghp?hl=en&​tab=wi"
onclick=​"gbar.qs(this)​" class=​"gb1">​Images​</a>

Note:  The above result-set generates the following:

ATTRIBUTE_NODE: 2
CDATA_SECTION_NODE: 4
COMMENT_NODE: 8
DOCUMENT_FRAGMENT_NODE: 11
DOCUMENT_NODE: 9
DOCUMENT_POSITION_CONTAINED_BY: 16
DOCUMENT_POSITION_CONTAINS: 8
DOCUMENT_POSITION_DISCONNECTED: 1
DOCUMENT_POSITION_FOLLOWING: 4
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32
DOCUMENT_POSITION_PRECEDING: 2
DOCUMENT_TYPE_NODE: 10
ELEMENT_NODE: 1
ENTITY_NODE: 6
ENTITY_REFERENCE_NODE: 5
NOTATION_NODE: 12
PROCESSING_INSTRUCTION_NODE: 7
TEXT_NODE: 3

and so on

I'm not sure if the level of detail is really needed but I do agree with some
type of message send on the returned object  is an excellent idea for writing
the object to the output stream.  I guess what you're saying would be similar
to Ruby's Object#to_s.  In any case, I found some interesting Javascript that
can add a FireBug console into Webkit here:

http://getfirebug.com/lite/Safari.html

This is nice but something native within WebKit would be nicer.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list