Re: Detecting the "type" of a DOM object

On 6/20/12, Cameron McCormack <cam@mcc.id.au> wrote:
> I think what I really want to write is:
>
>    if (n.is(Node))
>      ...
if(typeof n.is == "function" && n.is(Node))

But why? Do you include API version as a param? What does .is(Node)
say about what the object will do? This is getting to look a lot like
hasFeature.
-- 
Garrett
Twitter: @xkit
personx.tumblr.com

Received on Thursday, 21 June 2012 23:24:41 UTC