From eb2a4038c67d95bfd37962065325f3102767eca9 Mon Sep 17 00:00:00 2001 From: Keyan Zhang <2268452+keyz@users.noreply.github.com> Date: Tue, 9 Jan 2024 03:15:55 -0800 Subject: [PATCH] Add `allow-downloads` to iframes --- sandpack-client/src/clients/runtime/index.ts | 2 +- sandpack-client/src/clients/static/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sandpack-client/src/clients/runtime/index.ts b/sandpack-client/src/clients/runtime/index.ts index 627f5b7ea..74c551942 100644 --- a/sandpack-client/src/clients/runtime/index.ts +++ b/sandpack-client/src/clients/runtime/index.ts @@ -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( diff --git a/sandpack-client/src/clients/static/index.ts b/sandpack-client/src/clients/static/index.ts index 6038a8a55..8848ef2e8 100644 --- a/sandpack-client/src/clients/static/index.ts +++ b/sandpack-client/src/clients/static/index.ts @@ -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(