From 8d0fe5c45ac67ea4eef9a7c6a5e4eaaa57ad01d3 Mon Sep 17 00:00:00 2001 From: tza Date: Mon, 4 Apr 2022 20:46:35 +0300 Subject: hot reload now refreshes iframe also fixed fetch_nocors --- plugin_loader/static/plugin_page.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugin_loader/static/plugin_page.js') diff --git a/plugin_loader/static/plugin_page.js b/plugin_loader/static/plugin_page.js index c58188db..b42cd711 100644 --- a/plugin_loader/static/plugin_page.js +++ b/plugin_loader/static/plugin_page.js @@ -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"); -- cgit v1.2.3