Is your feature request related to a problem? Please describe.
when running a Streamlit/Gradio Space on huggingface.co/spaces/*, the Web Share API (navigator.share()) throws NotAllowedError: Permission denied. This happens because modern browsers (Chrome 110+, Safari, Firefox) block the Web Share API in third-party iframes unless the parent page explicitly allows it.
Describe the solution you'd like
Add allow="web-share" to the iframe element that embeds Spaces on the huggingface.co/spaces/* pages:
<iframe src="https://user-space.hf.space" allow="web-share" ...>
Describe alternatives you've considered
- Download-only flow (current workaround) - works but less convenient for mobile users
- Opening the Space in a new tab at the direct .hf.space URL - confusing UX
- Storing images server-side and sharing links - adds complexity and storage costs
Additional context
My Space (Itivrit AI) generates shareable image cards that users want to share directly to WhatsApp, Instagram, X, etc. This feature would benefit any Space that generates downloadable/shareable content.
Is your feature request related to a problem? Please describe.
when running a Streamlit/Gradio Space on huggingface.co/spaces/*, the Web Share API (
navigator.share()) throwsNotAllowedError: Permission denied. This happens because modern browsers (Chrome 110+, Safari, Firefox) block the Web Share API in third-party iframes unless the parent page explicitly allows it.Describe the solution you'd like
<iframe src="https://user-space.hf.space" allow="web-share" ...>Add
allow="web-share"to the iframe element that embeds Spaces on the huggingface.co/spaces/* pages:Describe alternatives you've considered
Additional context
My Space (Itivrit AI) generates shareable image cards that users want to share directly to WhatsApp, Instagram, X, etc. This feature would benefit any Space that generates downloadable/shareable content.