Re: Exposing constructors of readonly interfaces to web authors

On 7/10/14, 10:55 AM, Rik Cabanier wrote:
> What if instead of interfaces, we just define them as dictionaries:

The JS reflection of a dictionary (what you get after converting a Web 
IDL dictionary to a JS value) is an object with some value properties.

>          Object.defineProperty(this.bounds, 'left', { enumerable:
>     true,get: function() {
>     return Math.min(Math.min(self.p1.x, self.p2.x), Math.min(self.p3.x,
>     self.p4.x));
>          } });

So that's not a dictionary.

Furthermore, why is it a good idea to have these getters on a 
per-instance basis instead of on a shared prototype?

-Boris

Received on Thursday, 10 July 2014 16:10:21 UTC