W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2015

[Bug 22858] use @@hasInstance instead of [[HasInstance]]

From: <bugzilla@jessica.w3.org>
Date: Thu, 29 Jan 2015 18:11:12 +0000
To: public-script-coord@w3.org
Message-ID: <bug-22858-3890-a6JT70Ecss@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22858

Domenic Denicola <d@domenic.me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |d@domenic.me

--- Comment #3 from Domenic Denicola <d@domenic.me> ---
While I agree that the override of [[HasInstance]] seems pretty pointless, I
don't understand why it would be future-hostile. JS versions of the classes
could just override their @@hasInstance, e.g.

```js
class WebIDLThingy {
  static [Symbol.hasInstance](x) {
    return performBrandCheck(x);
  }
}
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Thursday, 29 January 2015 18:11:21 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 January 2015 18:11:21 UTC