Re: Figuring out easier readonly interfaces

On 10/2/13 5:31 PM, Tab Atkins Jr. wrote:
> And, regardless of what that method does, if it tries to mutate the
> proxy, it'll run into one of the intercepted traps.

No.  What that method does for, say, a getter is extract the underlying 
object that actually has the state (the C++ object in the case of Gecko 
and Blink and WebKit, for example) and modify _that_.

Let's do a concrete example to illustrate.

Say you had a readonly<Node> and you got the "id" setter off 
Element.prototype and called it.  What would happen, and why?

-Boris

Received on Wednesday, 2 October 2013 21:36:29 UTC