mirror of
https://github.com/chinchang/web-maker.git
synced 2025-04-21 03:01:52 +02:00
unblock iframe doc from accessing localstorage n cookies. fixes #558
This commit is contained in:
parent
5fc38cfa28
commit
b51edadc6d
@ -15,6 +15,6 @@ window.addEventListener('message', e => {
|
||||
|
||||
// Recieving from preview iframe
|
||||
if (e.data && e.data.logs) {
|
||||
window.opener.postMessage(e.data, '*');
|
||||
(window.opener || window.top).postMessage(e.data, '*');
|
||||
}
|
||||
});
|
||||
|
@ -955,11 +955,11 @@ export default class ContentWrap extends Component {
|
||||
/>
|
||||
) : (
|
||||
<iframe
|
||||
src={`./indexpm.html`}
|
||||
src={`${PREVIEW_FRAME_HOST}/preview.html`}
|
||||
ref={el => (this.frame = el)}
|
||||
frameborder="0"
|
||||
id="demo-frame"
|
||||
sandbox="allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups allow-presentation allow-scripts allow-top-navigation-by-user-activation"
|
||||
sandbox="allow-same-origin allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups allow-presentation allow-scripts allow-top-navigation-by-user-activation"
|
||||
allow="accelerometer; camera; encrypted-media; display-capture; geolocation; gyroscope; microphone; midi; clipboard-read; clipboard-write; web-share"
|
||||
allowpaymentrequest="true"
|
||||
allowfullscreen="true"
|
||||
|
@ -15,6 +15,6 @@ window.addEventListener('message', e => {
|
||||
|
||||
// Recieving from preview iframe
|
||||
if (e.data && e.data.logs) {
|
||||
window.opener.postMessage(e.data, '*');
|
||||
(window.opener || window.top).postMessage(e.data, '*');
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user