Re: [w3c/webcomponents] CustomElementRegistry.prototype.define<bulk>() (#892)

> The problems I've seen have to do with elements that coordinate and differences in upgrade order depending on definition order or whether the elements are in the main page, or created via `innerHTML`. With `innerHTML` upgrades happen in document order, and in the main page upgrades happen in definition order.

So to me, we need to discuss this issue before jumping onto any solution. From what you're saying, even if we were to add some capability to bulk define custom elements, we still need to coalesce the upgrades, and that's really the key feature here.

Perhaps what we need is an option to not upgrade all the connected elements in the document upon the call to `customElements.define`. The author can then call `customElements.upgrade(document)` once all custom elements have been defined.

-- 
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/892#issuecomment-673658474

Received on Thursday, 13 August 2020 19:09:22 UTC