Skip to content

Sandbox the simulator iframe. #959

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

Merged
merged 1 commit into from
Sep 14, 2022
Merged

Conversation

microbit-matt-hillsdon
Copy link
Collaborator

No description provided.

@github-actions
Copy link

@@ -111,6 +111,7 @@ const Simulator = ({
frameBorder="no"
scrolling="no"
allow="autoplay;microphone"
sandbox="allow-scripts allow-same-origin"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow-same-origin is needed to use the Fetch API to download the WebAssembly.

@microbit-matt-hillsdon
Copy link
Collaborator Author

Equivalent simulator demo change: microbit-foundation/micropython-microbit-v2-simulator#64

@microbit-matt-hillsdon
Copy link
Collaborator Author

microbit-matt-hillsdon commented Sep 14, 2022

Tested in:

  • Firefox
  • Safari
  • Chrome
  • Edge <- @microbit-robert please try, play some sounds as that seems like the most exciting thing we do.

Copy link
Collaborator

@microbit-robert microbit-robert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit 358f2c2 into main Sep 14, 2022
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the iframe-sandbox branch September 14, 2022 14:10
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.

2 participants