"I don't think that it is worthwhile, since Object.prototype extending is de facto considered wrong for many reasons."
I agree completely. There are already a few bad cases that jQuery doesn't handle: We don't support malformed markup, we don't support pages in quirks mode, we don't support people extending Object.prototype.
So that being said, there are two cases here:
1) Someone extending Object.prototype (in this case we would need to fix every internal use of for..in in jQuery).
2) Making some of the looping methods immune to cases where another prototype has been extended. For example:
- var Foo = function(){};
- Foo.prototype.test = "test";
- var obj = new Foo();
- jQuery.each( obj, function(){} ); // Probably shouldn't loop
Same goes with the post that was made concerning isEmptyObject. I can try and look in to these for 1.4.3.