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

> We can close over non-upgraded instances today, as is, and manipulate them before upgrade, and the problem isn't any different with or without Proxies, the way I see it.

I’m unsure, but possibly I think there may be a misunderstanding here about the upgrade process? When accessed prior to upgrade, the instance isn’t a different object from what’s around after upgrade. I.e. there’s no before element vs after element — the `this` during construction is that same object. It’s as if the invocation of all derived constructors on top of HTMLElement has been deferred to the point of upgrade. So if return override were supported (for proxies or anything else), the implication is that the DOM would need to update to exchange the original element with the override object in various places, and yes, the target would have leaked.

-- 
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-560021313

Received on Saturday, 30 November 2019 21:07:18 UTC