1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-20 13:31:12 +02:00

resolve conflict n merge master

This commit is contained in:
Kushagra Gour
2019-02-28 17:04:51 +05:30
8 changed files with 28 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
window.addEventListener('message', e => {
// Recieving from app window
if (e.data && e.data.contents) {
if (e.data && e.data.contents && e.data.contents.match(/<html/)) {
const frame = document.querySelector('iframe');
frame.src = frame.src;
setTimeout(() => {
@@ -9,7 +9,7 @@ window.addEventListener('message', e => {
frame.contentDocument.close();
}, 10);
}
if (e.data && e.data.url) {
if (e.data && e.data.url && e.data.match(/preview\.html/)) {
document.querySelector('iframe').src = e.data.url;
}