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/library.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugin_loader/static/library.js') diff --git a/plugin_loader/static/library.js b/plugin_loader/static/library.js index 1e35eee6..05e08ff2 100644 --- a/plugin_loader/static/library.js +++ b/plugin_loader/static/library.js @@ -2,7 +2,6 @@ class PluginEventTarget extends EventTarget { } method_call_ev_target = new PluginEventTarget(); window.addEventListener("message", function(evt) { - console.log(evt); let ev = new Event(evt.data.call_id); ev.data = evt.data.result; method_call_ev_target.dispatchEvent(ev); @@ -27,6 +26,8 @@ async function fetch_nocors(url, request={}) { let args = { method: "POST", headers: {}, body: "" }; request = {...args, ...request}; request.url = url; + request.data = request.body; + delete request.body; //maintain api-compatibility with fetch return await call_server_method("http_request", request); } -- cgit v1.2.3