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

Re: Detecting the "type" of a DOM object

From: Brendan Eich <brendan@meer.net>
Date: Thu, 21 Jun 2012 18:43:32 -0700
Message-Id: <5CFB1E9B-93EA-4A1F-AEC9-7A46195BAC85@meer.net>
Cc: David Bruant <bruant.d@gmail.com>, Boris Zbarsky <bzbarsky@MIT.EDU>, "public-script-coord@w3.org" <public-script-coord@w3.org>, "tomvc.be@gmail.com" <tomvc.be@gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Let's negotiate. Perhaps an API solution such as 'is' is better, but we should decisively reject instanceof first. Cc'ing Tom.

/be

On Jun 21, 2012, at 6:31 PM, Cameron McCormack <cam@mcc.id.au> wrote:

> David Bruant:
>> The direct proxy proposal lists the things that can't be faked by the
>> handler and instanceof is one of them.
> 
> Exactly.  A while ago, Web IDL used to require the [[HasInstance]] behaviour that Gecko has for its old-style bindings, where it didn't matter which global the RHS constructor object came from.  Once we starting considering what is possible for pure JS implementations, we dropped that.  Since there's no hasInstance trap on proxies, it would not be possible to implement a Web IDL interface object with pure JS.
> 
Received on Friday, 22 June 2012 01:44:03 UTC

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