Re: [w3c/webcomponents] Provide a lightweight mechanism to add styles to a custom element (#468)

I don't think it makes sense for `customElements.define` to take a promise. That would result in a flush-of-contents between the time custom elements are upgraded / constructed and when the stylesheet is loaded. Also, that means the custom element would likely need to handle the state in which a custom element is styleless. It's a lot cleaner & avoids flush-of-contents if the script had waited until the stylesheet is loaded to define a custom element instead.

-- 
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/468#issuecomment-400455445

Received on Tuesday, 26 June 2018 20:43:31 UTC