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

I don't think we want to make each element remember its "scope" object. This will lead to very strange results like the following two scripts generating completely different custom elements:
```js
div.innerHTML = '<some-element></some-element>';
```

```js
div.firstChild.innerHTML = '<some-element></some-element>';
```

```js
div.parentNode.innerHTML += '<some-element></some-element>';
```

That's simply way too confusing. Also, maintaining this kind of relationship with custom element registry is rather expensive because it would require O(n) memory cost to remember each element's registry.

I must also re-iterate objection against inheritance separate from the tree structure. Introducing a completely new inheritance / object hierarchy will be confusing for authors and complicates the implementation. The last I checked, inheritance wasn't a feature everyone needed.

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

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

Received on Monday, 18 July 2022 06:15:32 UTC