hot reload now refreshes iframe

also fixed fetch_nocors
This commit is contained in:
tza
2022-04-04 20:46:35 +03:00
parent 1d4100fabb
commit 8d0fe5c45a
3 changed files with 22 additions and 8 deletions
+5
View File
@@ -38,6 +38,11 @@
}, 100);
})();
function reloadIframe() {
console.log("reloading iframe");
document.getElementById("plugin_iframe").contentWindow.location.href = "http://127.0.0.1:1337/plugins/iframe";
}
function resolveMethodCall(call_id, result) {
let iframe = document.getElementById("plugin_iframe").contentWindow;
iframe.postMessage({'call_id': call_id, 'result': result}, "http://127.0.0.1:1337");