Re: [heycam/webidl] Add legacy platform objects. (#230)

bzbarsky commented on this pull request.



>  properties on the object, but are made to look like they are by being exposed
 by the \[[GetOwnProperty]] internal method.
 
-However, when the [{{Global}}] or
-[{{PrimaryGlobal}}]
-[=extended attribute=] has been used,
-named properties are not exposed on the object but on another object
-in the prototype chain, the [=named properties object=].
-
 It is permissible for an object to implement multiple interfaces that support indexed properties.

You mean "more than one interface that supports indexed/named properties"?

Gecko's IDL parser already disallows this (in violation of the above-quoted spec text) unless the interfaces inherit from each other.  There _is_ one case of interfaces inheriting from each other that both support named properties: HTMLFormControlsCollection and HTMLCollection.  There are no such cases for indexed properties.

In practice, I think the sane thing to do would be to disallow getters/setters on mixins altogether.  Then we only have to worry about the inheritance case, in which behavior is at least well-defined: the most-derived thing wins.  That said, we could disallow shadowing of indexed getters/setters too, if we want to, since nothing does that right now and adding new things that do it would be ... undesirable.

-- 
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/pull/230

Received on Wednesday, 9 November 2016 21:54:41 UTC