summaryrefslogtreecommitdiff
path: root/plugin_loader/static/library.js
diff options
context:
space:
mode:
authortza <marios8543@gmail.com>2022-04-04 20:46:35 +0300
committertza <marios8543@gmail.com>2022-04-04 20:46:35 +0300
commit8d0fe5c45ac67ea4eef9a7c6a5e4eaaa57ad01d3 (patch)
treeb7f966d50db684ef51736d78da76c966a92e4563 /plugin_loader/static/library.js
parent1d4100fabb7f70eaf1c653f5fd0647c20aa71a63 (diff)
downloaddecky-loader-8d0fe5c45ac67ea4eef9a7c6a5e4eaaa57ad01d3.tar.gz
decky-loader-8d0fe5c45ac67ea4eef9a7c6a5e4eaaa57ad01d3.zip
hot reload now refreshes iframe
also fixed fetch_nocors
Diffstat (limited to 'plugin_loader/static/library.js')
-rw-r--r--plugin_loader/static/library.js3
1 files changed, 2 insertions, 1 deletions
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);
}