- From: Darien Maillet Valentine <notifications@github.com>
- Date: Tue, 07 Mar 2023 08:00:33 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 7 March 2023 16:00:47 UTC
> No. It just means that you can't recursively call your own constructor before super() - which is already a restriction due to how upgrades work. While it wouldn’t be advisable or useful to do so, it’s not a runtime restriction (and seemingly can’t be, at least in terms of ES code semantics) because there’s nothing to key a specific expected invocation of `HTMLElement.[[Construct]](args, newTarget)` to an associated registry except for the identity of its `newTarget` argument. The example below shows how the intended registries can get swapped as a consequence — pretend `new Foo("scoped")` is being invoked with a scoped registry: ![image](https://user-images.githubusercontent.com/6257356/223464509-5616caf3-48fa-45db-b188-51866f59ffb5.png) I think this is the case @xiaochengh described [above](https://github.com/WICG/webcomponents/issues/969#issuecomment-1396352059). If this was already apparent, are you saying it’s okay if it’s not guaranteed that the registry associated with the instance `super()` furnishes will match the registry associated with the outer CE constructor invocation? -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/969#issuecomment-1458418288 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/969/1458418288@github.com>
Received on Tuesday, 7 March 2023 16:00:47 UTC