- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 2 Oct 2013 14:50:22 -0700
- 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. ~TJ
Received on Wednesday, 2 October 2013 21:51:12 UTC