Allow downloads inside JS output iframe (#931)

This commit is contained in:
Jonatan Kłosko 2022-01-25 14:29:57 +01:00 committed by GitHub
parent 5110f85e73
commit 2f55b87171
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -162,7 +162,7 @@ const JSOutput = {
// Note that we use `srcdoc`, so the iframe has the same origin as the
// parent. For this reason we intentionally don't use allow-same-origin,
// as it would allow the iframe to effectively access the parent window.
iframe.sandbox = "allow-scripts";
iframe.sandbox = "allow-scripts allow-downloads";
iframe.srcdoc = iframeHtml;
iframesEl.appendChild(iframe);