- From: Xiaocheng Hu <notifications@github.com>
- Date: Fri, 14 Apr 2023 13:06:41 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <WICG/webcomponents/issues/987/1509176799@github.com>
@chalbert Am I understanding it correctly that both this issue and #989 are trying propose the idea that each constructor should be restricted to one registry, and: - This issue provides a use case that can be easily solved by the idea, and seems hard to solve otherwise - #989 provides another proposal to allow reusing constructors without overriding, with possibly also some other benefits Anyway, I do not support this idea. The major reason is that it can cause conflicts in diamond dependency cases, while the whole purpose for scoped registries is to avoid registration conflicts. Treated differently, if a constructor can only be registered at one place, it's in some sense still global, which means it will cause conflicts and is something scoped registries want to avoid. Without this restriction, libraries directly creating light-dom children can still be migrated -- though not a straightforward task. > Libraries can create components from constructor on global registry. A component working on the global registry won't necessarily work on a scoped registry, or could stop working in the future, unless it has been specifically designed not to use constructors. I see the point. With scoped registries, direct usage of constructors would probably become an anti-pattern that we want to strongly discourage -- sort of a deprecation. Then it might need similar care like usage data etc. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/987#issuecomment-1509176799 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/987/1509176799@github.com>
Received on Friday, 14 April 2023 20:06:47 UTC