Re: [heycam/webidl] Should probably spec a hasInstance for DOM interface objects (#129)

> Is the test "is a platform object that implements the interface for which O is the interface prototype object" meant to work cross-realm?

Yes.  This is in fact the entire intent of the existing [[HasInstance]].

> It seems like youre revised version might be or might not be, depending on whether brands are cross-realm?

They better be, because DOM functions can be `.call`-ed cross-realm, yes?

> If that's the desired semantics, how many browsers implement that?

I believe Firefox is the only one that does.  That said, this is the behavior people agreed on when this was discussed on es-discuss several years ago...  I can't help it if other browsers didn't make implementing Web IDL a very high priority.  ;)

I agree that this does cause problems in terms of potential compat issues for whoever switches behavior.

> Web IDL's current algorithm performs an observable Get of the "prototype" property

It's not observable: the object the `Get` is done on in the current algorithm is guaranteed to be a Web IDL interface object, which has such a property defined as a readonly non-configurable value property.   At least modulo whatever happens with namespaces.

> Both also do observable proto-walks. Your algorithm omits these.

My algorithm does the proto walk.  It's right there in step 7.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/129#issuecomment-224353854

Received on Tuesday, 7 June 2016 17:30:00 UTC