Re: [w3c/webcomponents] Scoped Custom Element Registries (#716)

As far as I can tell, no one has yet explained how this will work:

```js
class MyElement extends HTMLElement {}

customRegistry.define('my-element', MyElement);

new MyElement();
```

Does this?

* Throw because it's no in the global registry?
* Create a new element, calling the constructor, because it exists in *some* registry? If this is the case, calling `define` on any registry puts the constructor in a global Set of some sort.

If the answer is the latter, meaning it is allowed, what happens when you then do:

```js
class MyElement extends HTMLElement {}

customRegistry.define('my-element', MyElement);

let el = new MyElement();
document.body.appendChild(el);
```

Note that this is appending to the document body, which is not part of the `customRegistry`. What happens at this point? Is this treated as an HTMLUnknownElement?

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

Received on Wednesday, 28 February 2018 20:16:51 UTC