> Can you explain which objects you expect would extend the final > object, and which object would not? > (nodes are objects too)
I think it should make the following expression evaluate to true: object && object.constructor === Object ( I'm not sure if it's strict enough, but what I mean is that the object should be constructed by Object ) > This is so wrong. > Maybe you can expect indexes in numerical order for Arrays, but still > Array.prototype is to often extended. > Also we have to iterate like sequence any array-like object (jQuery > objects, NodeLists,...). I think Array.prototype should never be extended, if it does, $.extend () is the first one to be broken (at least for jQuery 1.3.2). As for array-like objects, you can see how $.each() is implemented (I think it's like a convention that if an object conforms the condition I mentioned before, and has a "length" property, it should be treated like an array) var o = { length: 2, a : 1 } $.each(o, function(i, v) { console.log(i, v) }) This code prints 0, undefined 1, undefined in firebug, which means it breaks the convention and the result is expected. > If your argument is scoping, it is not enough. I don't quite understand what your are saying, could you be more specific? -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@googlegroups.com. To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.