Re: Maybe we should think about Interface.isInterface functions again

On 7/20/13 2:14 AM, Domenic Denicola wrote:
> Is it really worthwhile adding this surface area to all the APIs just to avoid the edge cases like HTMLElement.prototype instanceof Node? In what situation do we envision that kind of "false positive" being a problem?

https://twitter.com/kuvos/status/348019487120957440 and following 
discussion has a description of such a situation arising in real-life 
code: the code wants to test for ownerDocument being non-null, but it 
only wants to do this on Node objects, of course.  And 
HTMLElement.prototype is one of the objects it ends up being passed, for 
whatever reason...

-Boris

Received on Saturday, 20 July 2013 12:25:46 UTC