Right now we have a [[HasInstance]] thing at http://heycam.github.io/webidl/#es-interface-hasinstance but that's gone in ES6.
Proposed prose with similar semantics is something like:
F
be the this
value.V
be the first argument we were passed.F
is not an object, return false
.F
is not an interface object, return false
(or delegate to OrdinaryHasInstance
?)V
is not an object, return false
.V
is an object that implements the interface for which F
is the interface object (defined in terms of brands, whatever), return true
.OrdinaryHasInstance(F, V)
.@domenic, thoughts?
An open question is whether Node[Symbol.hasInstance] == Element[Symbol.hasInstance]
should test true or false. We could go either way, given the above prose, since they would implement the same algorithm...
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3