Re: Figuring out easier readonly interfaces

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