[WICG/webcomponents] [scoped-registries] Concerns about non-construction of scoped elements (Issue #987)

My primary concern is how risky moving a library from the global registry to a scoped registry would be.

My secondary concern is that it discourages libraries from using tag-abstract reference to other custom elements.

## Examples

1. [Library registered on global registry](https://codepen.io/chalbert/pen/ExewLMV)
This example works correctly, as expected.

2. [Library registered on scoped registry](https://codepen.io/chalbert/pen/poOWZYa) 
The same component moved to a scoped registry throws an run-time error, hidden inside a hard to test flow.

## Details

Moving a library from the global registry to a scoped registry would be dangerous unless you have total confidence that it has been tested on a scoped registry. Unit tests and test on a global registry would not be sufficient. Like in the example 2, bugs could happen deeply and not be easily identifiable. Upgrading a library would be  as dangerous. Of course libraries that always use shadowDOM with a custom registry would be safe from this, but there may still be to use cases where it is not possible, and anyway as it is allowed, we can assume it will happen.

For my secondary concern, what is the recommended way for a element to reference a component of the same library (outside shadowDOM) without assuming the tagName of this component?

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

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

Received on Thursday, 9 March 2023 12:22:38 UTC