[Prototype-core] Re: Suggested alteration to PrototypeJS' Object.keys implementation.

2010-10-26 Thread Andy E
Oops, small error causing infinite loops in IE :-) for (var i = 0; i DontEnumsLength; i--) { Should be for (var i = 0; i DontEnumsLength; i++) { I guess unit tests would have caught that. Andrew: I have to say, I've not seen any complaints anywhere about the errors

[Prototype-core] Re: Suggested alteration to PrototypeJS' Object.keys implementation.

2010-10-22 Thread Andy E
That's great work. I've found myself on your blog a few times in the last few weeks, but I hadn't seen this. I hope you don't mind, I used it to update the example on my blog to: (function () { var hasOwnProperty = Object.prototype.hasOwnProperty, hasDontEnumBug = true,

Re: [Prototype-core] Re: Suggested alteration to PrototypeJS' Object.keys implementation.

2010-10-22 Thread Andrew Dupont
This is great stuff. Due to its breadth, however, it will have to wait until 1.7.0.1, for which we've got a bunch of other ES5-compatibility fixes planned. If you and kangax think it would be worth getting the initially-proposed fix into 1.7, then I'll try my best to do so. Cheers, Andrew On

[Prototype-core] Re: Suggested alteration to PrototypeJS' Object.keys implementation.

2010-10-21 Thread kangax
On Oct 21, 12:11 pm, Andy E andyearns...@gmail.com wrote: kangax: I was thinking the same earlier (about caching the hasOwnProperty), when I realized that my method incorrectly doesn't allow functions to be passed (not sure about Prototype's original one).  I've updated the function on my

[Prototype-core] Re: Suggested alteration to PrototypeJS' Object.keys implementation.

2010-10-20 Thread Tobie Langel
Patch welcomed. On Oct 14, 10:45 pm, Andy E andyearns...@gmail.com wrote: I recently discovered that several compatibility implementations of Object.keys() on the web will throw an error for DOM objects in Internet Explorer 8 and lower.  This differs from the current browsers having a native

Re: [Prototype-core] Re: Suggested alteration to PrototypeJS' Object.keys implementation.

2010-10-20 Thread Andrew Dupont
Well, this is the entire change; only unit tests are missing, and I think we can add those ourselves if need be. Thanks, Andy! I think this is small enough that it can still make it into 1.7 (which we're days away from releasing), but others may disagree. Cheers, Andrew On Oct 20, 2010, at