mirror of
https://github.com/chinchang/web-maker.git
synced 2025-08-02 19:37:29 +02:00
fix sandboxing. offline support is gone
This commit is contained in:
@@ -185,11 +185,11 @@ export default class ContentWrap extends Component {
|
|||||||
};
|
};
|
||||||
const writeInsideIframe = () => {
|
const writeInsideIframe = () => {
|
||||||
if (!cachedSandboxAttribute && window.DEBUG) {
|
if (!cachedSandboxAttribute && window.DEBUG) {
|
||||||
alert('sandbox empty');
|
// alert('sandbox empty');
|
||||||
}
|
}
|
||||||
// console.log('setting back sandbox attr', sandbox);
|
// console.log('setting back sandbox attr', sandbox);
|
||||||
this.frame.setAttribute('sandbox', cachedSandboxAttribute);
|
// this.frame.setAttribute('sandbox', cachedSandboxAttribute);
|
||||||
this.frame.removeAttribute('sweet');
|
// this.frame.removeAttribute('sweet');
|
||||||
// console.log('sending postmessage');
|
// console.log('sending postmessage');
|
||||||
this.frame.contentWindow.postMessage({ contents }, '*');
|
this.frame.contentWindow.postMessage({ contents }, '*');
|
||||||
// this.frame.contentDocument.open();
|
// this.frame.contentDocument.open();
|
||||||
@@ -200,7 +200,7 @@ export default class ContentWrap extends Component {
|
|||||||
cachedSandboxAttribute = this.frame.getAttribute('sandbox');
|
cachedSandboxAttribute = this.frame.getAttribute('sandbox');
|
||||||
// console.log('removing sandbox', sandbox);
|
// console.log('removing sandbox', sandbox);
|
||||||
// this.frame.setAttribute('sweet', sandbox);
|
// this.frame.setAttribute('sweet', sandbox);
|
||||||
this.frame.removeAttribute('sandbox');
|
// this.frame.removeAttribute('sandbox');
|
||||||
refreshAndDo(writeInsideIframe);
|
refreshAndDo(writeInsideIframe);
|
||||||
});
|
});
|
||||||
// refreshAndDo(writeInsideIframe);
|
// refreshAndDo(writeInsideIframe);
|
||||||
|
Reference in New Issue
Block a user