W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

Re: Figuring out easier readonly interfaces

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 2 Oct 2013 14:47:54 -0700
Message-ID: <CA+c2ei90c7oiM6OqbpDKaroNGgsU=tKZMQBjr0Ukt1swB79RDA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Wed, Oct 2, 2013 at 2:43 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 10/2/13 5:36 PM, Boris Zbarsky wrote:
>>
>> Say you had a readonly<Node> and you got the "id" setter off
>> Element.prototype and called it.  What would happen, and why?
>
> Or readonly<Element> if you prefer.

I think we'd try to convert the thisArg to a Element, which would fail
since it's a proxy and not a Element. The setter would then throw.

Of course, by that logic grabbing the "id"-getter from a Element and
applying it to the proxy would fail for the same reason, which could
be bad.

I guess one question is, does readonly<Element>.prototype.id have the
same getter as Element.prototype.id?

/ Jonas
Received on Wednesday, 2 October 2013 21:48:52 UTC

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