Re: [WICG/webcomponents] Idea: Alternative Ways to Control Registry Scoping (Issue #1058)

At TPAC2024, a similar suggestion was made to introduce the ability to make the default registry for a document settable. With this capability one could implement this API.

```js
runWithScope = (registry, callback) => {
  const current = customElements.defaultRegistry;
  customElements.defaultRegistry = registry;
  callback();
  customElements.defaultRegistry = current;
}
```

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

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

Received on Wednesday, 25 September 2024 19:15:34 UTC