1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-29 01:30:16 +02:00

get JS working again

This commit is contained in:
Kushagra Gour
2024-04-10 13:58:08 +05:30
parent 2ea0090564
commit 6553a424de
7 changed files with 50 additions and 84 deletions

View File

@@ -4,9 +4,7 @@ window.addEventListener('message', e => {
const frame = document.querySelector('iframe');
frame.src = frame.src;
setTimeout(() => {
frame.contentDocument.open();
frame.contentDocument.write(e.data.contents);
frame.contentDocument.close();
frame.contentWindow.postMessage(e.data, '*');
}, 10);
}
if (e.data && e.data.url && e.data.url.match(/index\.html/)) {