mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 03:52:07 +08:00
3.5.0
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user