Skip to main content

Bug Tracker

Side navigation

#8993 closed bug (fixed)

Opened April 28, 2011 07:04AM UTC

Closed May 02, 2011 05:26PM UTC

jQuery.map( emptyNodeList ) enumerating properties.

Reported by: rkatic Owned by:
Priority: blocker Milestone: 1.6
Component: core Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:
Description
Attachments (0)
Change History (5)

Changed April 28, 2011 07:39AM UTC by rkatic comment:1

Changed April 29, 2011 08:43PM UTC by rwaldron comment:2

component: unfiledcore
priority: undecidedlow
resolution: → invalid
status: newclosed

jQuery does not have documented support for native DOM NodeLists

Changed April 30, 2011 09:08AM UTC by rkatic comment:3

_comment0: There is no mention of NOT supporting native DOM NodeList neither. \ \ "Array-like objects, such as jQuery collections, are treated as arrays. In other words, if an object has a .length property and a value on the .length - 1 index, it is traversed as an array." \ \ By such definition, in my opinion, NodeLists with length > 1 are also array-like objects. \ \ Are you saying that DOM objects are not objects? If so, can you point me to that part?1304154664736748
_comment1: There is no mention of NOT supporting native DOM NodeLists neither. \ \ "Array-like objects, such as jQuery collections, are treated as arrays. In other words, if an object has a .length property and a value on the .length - 1 index, it is traversed as an array." \ \ By such definition, in my opinion, NodeLists with length > 0 are also array-like objects. \ \ Are you saying that DOM objects are not objects? If so, can you point me to that part?1304156035484434
_comment2: There is no mention of NOT supporting native DOM NodeLists neither. \ \ "Array-like objects, such as jQuery collections, are treated as arrays. In other words, if an object has a .length property and a value on the .length - 1 index, it is traversed as an array." \ \ Ah yea, it's because of #9023, how silly of me.1304156106624636

There is no mention of NOT supporting native DOM NodeLists neither.

"Array-like objects, such as jQuery collections, are treated as arrays. In other words, if an object has a .length property and a value on the .length - 1 index, it is traversed as an array."

Ah yea, it's because of #9023, how silly of me.

So it's not because it is NodeList, but because it is EMPTY.

Changed May 02, 2011 05:25PM UTC by john comment:4

milestone: 1.next1.6
priority: lowblocker
resolution: invalid
status: closedreopened

Changed May 02, 2011 05:26PM UTC by John Resig comment:5

resolution: → fixed
status: reopenedclosed

Make sure that empty nodelists continue to map properly. Fixes #8993.

Changeset: 6c449fd5df3e0ec50e893d055da9aea486e7d71c