Re: [WICG/webcomponents] [scoped-registries] What does `new` mean for elements in multiple registries? (Issue #1007)

Seems like this makes DSD of limited use to people who are using elements that require arguments, f.e. `new SomeEl(a, b, c)`.

We'll be able to do this currently when we don't know a name:

```js
customRegistry.createElement(
  customRegistry.getName(SomeEl)
)
```

Maybe we need a way to pass args too, f.e.

```js
customRegistry.createElement(
  customRegistry.getName(SomeEl), a, b, c
)
```

or

```js
customRegistry.createElement(
  customRegistry.getName(SomeEl),
  { args: [a, b, c] }
)
```

or 

```js
customRegistry.construct(SomeEl, a, b, c)
```

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

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

Received on Friday, 13 December 2024 08:40:21 UTC