Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide content until loaded #8

Open
bennypowers opened this issue Feb 18, 2020 · 0 comments
Open

Hide content until loaded #8

bennypowers opened this issue Feb 18, 2020 · 0 comments

Comments

@bennypowers
Copy link
Contributor

Following on #7 (comment), we'd like some atts to control loading behaviour.

Strawman

Default loading behaviour should defer the load event until all loaded resources are finished.
It should also hide the content with display: none; until the resources are loaded.

Applying the fouc attribute disables the hide-until-load-event behaviour, showing content and allowing a FOUC to occur

Applying the eager attribute disables the defer-load-event behaviour, firing the load event as soon as the partial at src is fetched and parsed as innerHTML

Questions

  • Should we defer load for only link[rel="stylesheet"], or for img and iframe as well?
  • Bikeshedding attr names: proposed names are very bespoke, can we uses something more appropriate by borrowing from existing APIs? (async, defer, etc.)
    • OTOH, we'd perhaps like these behaviours to be opt-out rather than opt-in, so no-async no-defer?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant