On Nov 11, 6:02 pm, "Andrea Giammarchi" <[EMAIL PROTECTED]>
wrote:
> it is not only toString, it is every native Object.prototype like valueOf,
> etc etc

Yep, it's called "DontEnum bug". IE fails to enumerate over properties
of an object if that object has same-named properties with DontEnum
flag in the prototype chain. In other words, those are usually all of
native Object.prototype.* methods.

>
> for(var k in {toString:1,valueOf:1,hasOwnProperty:1})
>     alert(k);
>
> accordingly, for those methods you should check if the object
> hasOwnProperty("methodName")
>
> if($.browser.msie){

This bug is easy to feature test. Why resort to meaningless solutions
(i.e. ua sniffing) ; )
http://github.com/kangax/protolicious/tree/master/experimental/object.for_in.js#L19

[...]

>
> Regards

[...]

--
kangax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to