1 Star 0 Fork 0

阳葵 / electron-study

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.js 508 Bytes
一键复制 编辑 原始数据 按行查看 历史
阳葵 提交于 2017-09-09 18:11 . 基本完成截图功能
/**
* Created by yangkui on 2017/9/9.
*/
// You can also require other files to run in this process
//require('./renderer.js')
const ipcRenderer = require('electron').ipcRenderer;
//console.log(ipcRenderer.sendSync('synchronous-message', 'ping')); // prints "pong"
ipcRenderer.on('asynchronous-reply', function (event, arg) {
console.log(arg); // prints "pong"
});
//发送消息到主线程当中
function showChatWindow() {
ipcRenderer.send('synchronous-message', 'showChatWindow');
}
NodeJS
1
https://gitee.com/ookk/electron-study.git
git@gitee.com:ookk/electron-study.git
ookk
electron-study
electron-study
master

搜索帮助