[#1443] Add 'allow-downloads' to iframe sandbox

This commit is contained in:
Cassie Tarakajian 2020-06-15 13:14:48 -04:00
parent b805754d04
commit fb7b3eaef4
1 changed files with 3 additions and 1 deletions

View File

@ -353,6 +353,8 @@ class PreviewFrame extends React.Component {
'preview-frame': true,
'preview-frame--full-view': this.props.fullView
});
const sandboxAttributes =
'allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms allow-modals allow-downloads';
return (
<iframe
id="canvas_frame"
@ -362,7 +364,7 @@ class PreviewFrame extends React.Component {
frameBorder="0"
title="sketch preview"
ref={(element) => { this.iframeElement = element; }}
sandbox="allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms allow-modals"
sandbox={sandboxAttributes}
/>
);
}