Re: [WICG/webcomponents] [scoped-registries] Interaction with HTML element's overridden constructor steps (Issue #969)

+1, in the polyfill I used a global stack to communicate the registry to the `super()`, but storing a slot temporarily on the `NewTarget` seems better.

Like Justin said, the only thing would be to make sure the browser treats calling `new` on the same `NewTarget` before `super()` as an error (since that would construct what should use the global `tagName` as the scoped `tagName`). Justin and I discussed today, and that might just be as simple as checking that the `tagName` of the returned instance is the same as the one expected from the registry set before calling `new`, and erroring otherwise.

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

Message ID: <WICG/webcomponents/issues/969/1283125674@github.com>

Received on Tuesday, 18 October 2022 23:19:42 UTC