And this is why I ask :)

Thanks for the explanation. 
http://dev.timshomepage.net/kis-js/src/core/core.js

If someone wants to get dirty with IE events, my event module could also 
use some help: 
https://github.com/aviat4ion/kis-js/blob/master/src/modules/event.js

On Monday, October 31, 2011 12:01:24 PM UTC-4, Jake Verbaten wrote:
>
> That's not how JavaScript works. the only objects on which obj.nodeType 
> fails are null & undefined. and typeof null === "object" so your check 
> doesn't guard against one of those.
>
> On Mon, Oct 31, 2011 at 3:18 PM, Timothy J. Warren <[email protected]>wrote:
>
>>
>> I think the object type check is slightly better, because a primitive 
>> type would also have to check for the nodeType property, and would then 
>> throw an error than the property is undefined. This way, it tosses out 
>> primitive values before they are pointlessly checked for a "nodeType" 
>> property.
>>
>

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to