W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2012

Re: Detecting the "type" of a DOM object

From: Tom Van Cutsem <tomvc.be@gmail.com>
Date: Fri, 22 Jun 2012 17:14:57 +0200
Message-ID: <CAKDfNj8bY5WL3nDawiJpF45+4YPEbZttx-gwgD5TusWRpb_8YA@mail.gmail.com>
To: David Bruant <bruant.d@gmail.com>, Brendan Eich <brendan@meer.net>, Cameron McCormack <cam@mcc.id.au>, Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
2012/6/22 David Bruant <bruant.d@gmail.com>

> For the record, rationale for not including a trap for instanceof was
> described here: http://wiki.ecmascript.org/**doku.php?id=harmony:proxies#*
> *interaction_with_instanceof<http://wiki.ecmascript.org/doku.php?id=harmony:proxies#interaction_with_instanceof>


We've gone through this in detail before. There even was a strawman, but it
got deferred, see <
http://wiki.ecmascript.org/doku.php?id=strawman:proxy_instanceof>

>From that strawman's "feedback" section:

"TC39 November 2010 meeting: after a meeting with the Web IDL editors,
agreed that Web IDL should not expose the multiple inheritance. Hence, a
custom [[HasInstance]] would not be necessary to wrap these host objects.

There may be other use cases for a custom [[HasInstance]] (outside of Web
IDL), but until such cases are identified we agreed not to pursue this
strawman in the interest of not further complicating the Proxy API."

I don't think the new direct proxies API impacts this strawman, so
technically I see no reason why proxies can't have a [[HasInstance]] trap
if needed.

Cheers,
Tom
Received on Friday, 22 June 2012 15:15:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC