Re: [w3c/webcomponents] Returning a Proxy from a Custom Element constructor (#857)

>  also, because an unupgraded instance is potentially out there, you’d now have to do something to replace that object, and you’d have leaked the proxy target at best — things could get pretty weird.

I don't get that part. I always thought the unupgraded instance would be the same instance always used by user or engine, regardless if it is a target for a Proxy, or an item in an Array, or a key in a WeakMap.

Can't the engine be made to read the internal `[[Target]]` slot of the Proxy, and if that's also a Proxy, keep reading it until finally it finds the non-proxy target, and only error if that underlying object is not the same `this` that the engine has?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/857#issuecomment-560015273

Received on Saturday, 30 November 2019 19:42:28 UTC