Commit 775fc4c
feat: Add full screen support for ObjectPreview iframes (#224)
## What I'm changing
This change enables the ObjectPreview `iframe` element to launch full
screen mode for viewers that request it, such as the image and 3D model
viewers from #210.
## How I did it
I've added the permissions policy `allow="fullscreen"` to the `iframe`
in ObjectPreview. This enables any current or future viewer to launch
full screen mode.
An alternative approach would be to make `allow` a custom per-format
attribute like `style`, but this seems simpler.
## How you can test it
On a preview branch where this feature is active, navigate to the
following pages and click the "Toggle full screen" button within the
preview `iframe`:
*
https://source.coop/harvard-lil/smithsonian-open-access/media/nmnh/NMNH-00000406-000001.jpg
*
https://source.coop/harvard-lil/smithsonian-open-access/3d/009463d3-6f58-4f5b-8e60-915805a876ee/USNM_91201-150k-1024-low.glb
Co-authored-by: Anthony Lukach <anthonylukach@gmail.com>1 parent 106c834 commit 775fc4c
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments