Skip to content

Commit

Permalink
fix: add allow-downloads to iframes (#1054)
Browse files Browse the repository at this point in the history
  • Loading branch information
keyz authored Jan 10, 2024
1 parent ae34ec2 commit c038e13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sandpack-client/src/clients/runtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class SandpackRuntime extends SandpackClient {
if (!this.iframe.getAttribute("sandbox")) {
this.iframe.setAttribute(
"sandbox",
"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts allow-downloads allow-pointer-lock"
);

this.iframe.setAttribute(
Expand Down
2 changes: 1 addition & 1 deletion sandpack-client/src/clients/static/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class SandpackStatic extends SandpackClient {
if (!this.iframe.getAttribute("sandbox")) {
this.iframe.setAttribute(
"sandbox",
"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts allow-downloads allow-pointer-lock"
);

this.iframe.setAttribute(
Expand Down

1 comment on commit c038e13

@vercel
Copy link

@vercel vercel bot commented on c038e13 Jan 10, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.