在渲染进程中使用主进程模块。
remote 模块为渲染进程(web 页面)和 主进程 通信(IPC:Inter-Process Communication)提供了一种简单方法。
若不使用 remote 在主进程和渲染进程间通信需使用 ipcMain 和 ipcRenderer 模块,这样会需要编写大量的事件监听与触发代码。