-
Notifications
You must be signed in to change notification settings - Fork 525
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
Playground doesn't allow-modals
#12023
Comments
allow-modals
enabledallow-modals
Hey @caugner @ericrav @Josh-Cena . This issue is relevant. The Live Example in this section is broken too. On pressing the button, the output is always: This is likely due to the The only question I have is, will adding this option have an impact on security? |
see also #11693 |
The following PR fixes the issue reported by OP: There are incoming changes for the string concat examples: |
Thanks, all. Closing this as the linked PRs resolve the problem. |
Summary
Playground examples can't run functions like Window.alert(), Window.confirm(), Window.print() and Window.prompt(), because they require the iframe to allow modals.
URL
https://developer.mozilla.org/en-US/play?id=5LQLRl7WZd5jYDacre%2FTXtVGS%2FhsJouAHE2pExEMRUtnJaPVVd3kHX%2FzTn38Jvoen2uLMbThfw7c7zBU
Reproduction steps
print()
was ignoredExpected behavior
Examples can successfully demonstrate the relevant web API functionality
Actual behavior
The APIs in the example do not work, and the browser logs the error:
Ignored call to 'print()'. The document is sandboxed, and the 'allow-modals' keyword is not set.
Device
Desktop
Browser
Chrome
Browser version
Stable
Operating system
Mac OS
Screenshot
Anything else?
I believe this is the line that needs to be updated:
yari/client/src/playground/index.tsx
Line 391 in 55dcf6f
Validations
The text was updated successfully, but these errors were encountered: