Re: [WICG/webcomponents] [scoped-registries] Proposal for registry extension (Issue #989)

I see extension as a natural idea, but I don't see the exact benefit yet. Instead of
```js
const registry = new CustomElementRegistry({
  extends: [registryA, registryB, registryC]
});
```

Why can't we just do
```js
registry.define('component-a', ComponentAFromLibA);
registry.define('component-b', ComponentBFromLibB);
registry.define('component-c', ComponentBFromLibC);
```

---

There's also a contradition between:
- Resolving conflicts with prefix (`getLibBRegistry({ prefix: 'foobar' })`), which creates a copy of the original registry, which means the constructors are registered at multiple places with different names
- Restricting each constructor to a unique registry with a unique local name

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

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

Received on Wednesday, 12 April 2023 22:12:02 UTC