W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

Re: Exposing constructors of readonly interfaces to web authors

From: Rik Cabanier <cabanier@gmail.com>
Date: Sat, 28 Jun 2014 11:52:33 -0700
Message-ID: <CAGN7qDDphKtt5LcxMVVPH0eacBdX8F5nVfqwrCoLkS8swHC-Eg@mail.gmail.com>
To: Brendan Eich <brendan@secure.meer.net>
Cc: Dirk Schulze <dschulze@adobe.com>, Anne van Kesteren <annevk@annevk.nl>, Domenic Denicola <domenic@domenicdenicola.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Sat, Jun 28, 2014 at 6:43 AM, Brendan Eich <brendan@secure.meer.net>
wrote:

> Dirk Schulze wrote:
>
>> DOMQuad is a new interface and indeed part of general layout efforts that
>> give authors more control and information over layout with JS. With the
>> described behavior, a live object is reasonable IMO.
>>
>
> This side of the discussion still seems to be missing the shared getters
> in prototype point, which is important. The (correct, compared to Rik's --
> thanks!) JS you sketched using Object.defineProperty makes getters *per
> instance*, with fresh getter function suites per instance -- and this is
> observable via ES5 introspection APIs. It's also way too costly for
> implementors to tolerate.


Can't we change the code so it always returns the same getters? ie instead
of creating a new {} and getter function, keep a reference of them in the
object and use them in Object.defineProperty. That way the object's
prototype will always have the same getters and it won't be very costly to
implement.
Received on Saturday, 28 June 2014 18:53:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:22 UTC