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

> The downside would be that if the constructor is accessed from within a custom-scoped component, it will not be the original constructor but the subclassed one.

Note that in the demo the subclass also has a unique prototype inheriting from the original and the constructor has its own new name and length properties. While this pattern doesn’t require the registry-specific prototype, it’s awkward to omit it because if that were done, `new instance.constructor` would use the global registry. More importantly though, so would any use of `ReentryByDirectCall` inside the class body — that binding identifier would be pointing at the original constructor regardless.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/969#issuecomment-1445414319

You are receiving this because you are subscribed to this thread.

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

Received on Sunday, 26 February 2023 17:25:10 UTC