On 6/20/12 11:20 PM, Cameron McCormack wrote: > I think what I really want to write is: > > if (n.is(Node)) > ... > > but I don't think that will fly. What if we used a catapult? It looks _really_ nice. ;) The real problem with it is that it will throw for random non-DOM objects, which we really can't require to have is() on them.... How much would people hate a "n is Node" language feature akin to instanceof but more flexible? Alternately, we could try to make instanceof actually work cross-global? > Node.isInterfaceOf(n) > Node.isImplementedBy(n) I like these two, I guess, of the list of suggestions. -BorisReceived on Thursday, 21 June 2012 05:30:34 UTC
This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC