Re: [WICG/webcomponents] `CustomElementRegistry.define()` should return the new custom element (#927)

> Hmm this confuses me. `define()` doesnt create any element, just registers the ability to create custom elements from registry. So there wouldn't be an element to return. Or do you mean it should return the constructor?

I _think_ the proposal is to return the second argument. I'm a bit hesitant to adding something like that because it closes the possibility of future extensions to `define`. e.g. We have proposals / discussions for lazily defining custom elements: https://github.com/WICG/webcomponents/issues/782. We may decide that the way to do that is to let `define` accept a `Promise` as the second argument.

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

Received on Sunday, 23 May 2021 02:10:08 UTC