ipc: tweak logging

This commit is contained in:
CanadaHonk 2023-04-02 19:01:11 +01:00
parent ae48794e46
commit cd69046694

View File

@ -133,11 +133,11 @@ delete window._gluonSend;
let onIPCReply = {}, ipcListeners = {}; let onIPCReply = {}, ipcListeners = {};
const sendToWindow = async (type, data, id = undefined) => { const sendToWindow = async (type, data, id = undefined) => {
if (logIPC) log('IPC: send', { type, data, id });
const isReply = !!id; const isReply = !!id;
id = id ?? Math.random().toString().split('.')[1]; id = id ?? Math.random().toString().split('.')[1];
if (logIPC) log('IPC: send', { type, data, id });
evalInWindow(`window.Gluon.ipc._receive(${JSON.stringify({ evalInWindow(`window.Gluon.ipc._receive(${JSON.stringify({
id, id,
type, type,