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

Re: Figuring out easier readonly interfaces

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 2 Oct 2013 14:50:22 -0700
Message-ID: <CAAWBYDBytXr5Vmrh9cM49huNmMwPL5QM9eSY6U4N83_Du1CTMQ@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Wed, Oct 2, 2013 at 2:47 PM, Jonas Sicking <jonas@sicking.cc> wrote:
> 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?

Under the explanation I gave, yes.  Both of them return the same
object from the ".prototype" [[Get]], and so they'll of course return
the same getter from .id.

Received on Wednesday, 2 October 2013 21:51:12 UTC

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