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

Support providing an image for progressive enhancement #2

Open
spaceninja opened this issue Nov 28, 2023 · 1 comment
Open

Support providing an image for progressive enhancement #2

spaceninja opened this issue Nov 28, 2023 · 1 comment

Comments

@spaceninja
Copy link
Member

@Paul-Hebert suggested:

From a progressive enhancement perspective it would be kind of nice if the poster image was a slotted img tag but I realize this would diverge from the model-viewer API so I understand if that goes against your goals.

<lite-model-viewer>
  <img alt="" src="" slot="poster" />
</lite-model-viewer>
@spaceninja
Copy link
Member Author

This is a slick idea — if we added it, I think we'd update the JS to check for an img in the "poster" slot, and grab the src value to apply as the poster.

I only hesitated to pull the trigger on this because it's unclear what value a non-JS experience provides here, given that <model-viewer> itself is JS-only.

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