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

Permissions on preset Iframe #320

Open
yairhaimo opened this issue Jan 25, 2023 · 2 comments
Open

Permissions on preset Iframe #320

yairhaimo opened this issue Jan 25, 2023 · 2 comments

Comments

@yairhaimo
Copy link

Hi,

Is there a way to add permissions to the preset iframe?
Like the example from codesandbox:

<iframe
  src="https://codesandbox.io/embed/new?codemirror=1"
  style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
  allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
  sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
></iframe>

If not, would you be open to a PR?

Amazing library btw!

@yairhaimo
Copy link
Author

FYI - Sandpack added the allow attribute to their iframe a week ago but they have an open issue where it doesnt work:
Sandpack preview's iframe is not setting allow with domain

@yairhaimo
Copy link
Author

They fixed the issue but didnt publish a new version yet. I tested with latest main - they seem to have an error with the latest bundler (1.20.6) but if you change it to 1.20.1 it works correctly and asks for permissions.

Just FYI i guess

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