This commit is contained in:
哆啦好梦
2023-07-03 18:00:31 +08:00
parent 3e36a4a017
commit 26385f06b0
5 changed files with 20 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
const { ipcRenderer: ipc } = (window.require && window.require('electron')) || window.electron || {};
const Renderer = (window.require && window.require('electron')) || window.electron || {};
/**
* ipc
@@ -17,12 +17,16 @@ const { ipcRenderer: ipc } = (window.require && window.require('electron')) || w
* ipc.sendToHost(channel, ...args) - 消息会被发送到 host 页面上的 <webview> 元素
*/
/**
* ipc
*/
const ipc = Renderer.ipcRenderer || undefined;
/**
* 是否为EE环境
*/
const isEE = ipc ? true : false;
export {
ipc,
isEE
}
export default {
Renderer, ipc, isEE
}