I'm not sure why proxy doesn't have handlers for [[Hasinstance]]. But if we stick with that we should see if we can eliminate [[Hasinstance]] from es6
Allen
Brendan Eich <brendan@meer.net> wrote: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.
>