This showed up on Douglas Crockford's blog today:
Object.prototype.toString.apply(value) === '[object Array]'

The trick appears to have been in circulation for about 6 months and
shows up in DWR as well as DC's book. DC credits Mark Miller for it.
Probably slower than the value.constructor == Array test we use
everywhere, but fixes the iframe-created object issue.

1. Should we adopt it for resiliency?
2. @Michael Geary: Are you using this in your iframe sandbox code? It
sure would beat the heck out of duck typing.

Just starting a discussion...
Nathan
--~--~---------~--~----~------------~-------~--~----~
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