W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sat, 20 Jul 2013 08:25:16 -0400
Message-ID: <51EA81AC.5000906@mit.edu>
To: Domenic Denicola <domenic@domenicdenicola.com>
CC: Travis Leithead <travis.leithead@microsoft.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
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...

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:17 UTC