- From: Boris Zbarsky <notifications@github.com>
- Date: Tue, 13 Jan 2015 11:50:03 -0800
- To: heycam/webidl <webidl@noreply.github.com>
- Message-ID: <heycam/webidl/pull/38/c69807414@github.com>
> The only thing [NoInterfaceObject] does is remove the global property; the interface still exists. Sorry, but no. The spec says, at <http://heycam.github.io/webidl/#NoInterfaceObject>: If the [NoInterfaceObject] extended attribute appears on an interface, it indicates that an interface object will not exist for the interface in the ECMAScript binding. And then in http://heycam.github.io/webidl/#interface-prototype-object it says: If the [NoInterfaceObject] extended attribute was not specified on the interface, then the interface prototype object MUST also have a property named “constructor” You can see this in Gecko: (new XMLHttpRequest).__proto__.__proto__.hasOwnProperty("constructor") tests false. Blink has a different behavior, but that's a bug in Blink per current spec. > this breaks the correpsondence Not any more than if you had an object with no "constructor" property on a prototype chain in general... We could change things around so that constructor objects are in fact required to exist but simply not be exposed on the global with [NoInterfaceObject]. That's not how things work right now, however. Of course this whole business of having [NoInterfaceObject] stuff on proto chains is pretty broken to start with, imo. The only case I where this happens (at least in Gecko's IDL) is XMLHttpRequestEventTarget, which isn't even implemented anywhere except Blink and Gecko as far as I can tell. So maybe we can just drop the [NoInterfaceObject] from there and then disallow having [NoInterfaceObject] ancestor interfaces for something that has an interface object? @annevk? --- Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/pull/38#issuecomment-69807414
Received on Tuesday, 13 January 2015 19:50:29 UTC