[dojo-contributors] Re: dojo.lang.isUndefined()

Bob Ippolito bob at redivi.com
Thu Jun 29 20:49:21 EDT 2006


On Jun 29, 2006, at 5:13 PM, Scott J. Miles wrote:

>>> IE returns "unknown" for some typeof tests. At least they are  
>>> honest. ;-)
>
> In that case, the dj_undef test should probably look like:
>
> return (!(name in object) || (typeof object[name] == "undefined"));

I don't think the given statement was specific enough to know that  
the existing code is wrong and determine that the above code is the  
right solution. Maybe it returns "unknown" for some typeof tests such  
that the object is defined but its type is ambiguous somehow? I'd ask  
for a test that proves that it returns "unknown" sometimes so that  
you could check to see whether dj_undef does the right thing in those  
cases.

-bob




More information about the dojo-contributors mailing list