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

fix DPR for iframes #4723

Merged
merged 1 commit into from Mar 22, 2024
Merged

fix DPR for iframes #4723

merged 1 commit into from Mar 22, 2024

Conversation

elalish
Copy link
Collaborator

@elalish elalish commented Mar 22, 2024

Turns out any <model-viewer> embedded in an <iframe> gets the capped DPR=1 (no high-res render) unless the iframe has a meta viewport tag in its own <head>. That's a bit weird, since meta viewport tags are ignored in iframes and only the top-level document counts. As such, we'll assume the top level document has a meta viewport tag (as that's more common) when the element is inside an iframe and can't query its parent's <head>.

@elalish elalish self-assigned this Mar 22, 2024
@elalish elalish merged commit 5c23a13 into master Mar 22, 2024
6 checks passed
@elalish elalish deleted the metaViewport branch March 22, 2024 21:46
JL-Vidinoti pushed a commit to vidinoti/model-viewer that referenced this pull request Apr 22, 2024
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

Successfully merging this pull request may close these issues.

None yet

1 participant