ipc: tweak logging
This commit is contained in:
parent
ae48794e46
commit
cd69046694
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user