lume / element

Fast and simple custom elements.
https://lume.io
MIT License
127 stars 5 forks source link

add a way for content to not be displayed until async assets (f.e. link elements) are loaded. #14

Open trusktr opened 6 months ago

trusktr commented 6 months ago

FUOC is something that people generally wish they didn't have to deal with. To make things easier, perhaps we can add an option that will automatically keep content hidden until async content in a element's ShadowRoot has finished loading.

What we may need is some sort of convention for all elements to follow. For example, maybe elements specify a list of the elements (from their template) that load stuff, then the base Element class can wait for load events on all of them, and finally emit a load event on the owning element. This setup then allows any higher-up elements to do the same thing, and so on.