Skip to content

Commit 53cb305

Browse files
authored
Merge pull request #1457 from processing/allow-downloads
[#1443] Add 'allow-downloads' to iframe sandbox
2 parents b805754 + fb7b3ea commit 53cb305

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: client/modules/IDE/components/PreviewFrame.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ class PreviewFrame extends React.Component {
353353
'preview-frame': true,
354354
'preview-frame--full-view': this.props.fullView
355355
});
356+
const sandboxAttributes =
357+
'allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms allow-modals allow-downloads';
356358
return (
357359
<iframe
358360
id="canvas_frame"
@@ -362,7 +364,7 @@ class PreviewFrame extends React.Component {
362364
frameBorder="0"
363365
title="sketch preview"
364366
ref={(element) => { this.iframeElement = element; }}
365-
sandbox="allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms allow-modals"
367+
sandbox={sandboxAttributes}
366368
/>
367369
);
368370
}

0 commit comments

Comments
 (0)