{"size": 880, "ext": "js", "max_stars_repo_path": "renderer.js", "max_stars_repo_name": "Zack921/electron-quick-start", "max_stars_repo_stars_event_min_datetime": "2022-01-03T09:16:38.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-03T10:51:46.000Z", "max_issues_repo_path": "renderer.js", "max_issues_repo_name": "Cc15b/electron-quick-start", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "renderer.js", "max_forks_repo_name": "Cc15b/electron-quick-start", "max_forks_repo_forks_event_min_datetime": "2022-01-03T09:14:57.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-03T09:14:57.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 35.2, "max_line_length": 63, "alphanum_fraction": 0.7068181818}
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// No Node.js APIs are available in this process because
// `nodeIntegration` is turned off. Use `preload.js` to
// selectively enable features needed in the rendering
// process.
// const {ipcRenderer} = require('electron')

// //发送asynchronous-message事件到主进程
// ipcRenderer.send('asynchronous-message', 'ping')

// //接收主进程的asynchronous-reply通知
// ipcRenderer.on('asynchronous-reply', (event, arg) => {
//   console.log('asynchronous-reply : args:',arg)
//   const message = `Asynchronous message reply: ${arg}`
//   document.getElementById('async-reply').innerHTML = message
// })

window.api.receive("fromMain", (data) => {
  console.log(`Received ${data} from main process`);
});

window.api.send("toMain", "some data");

window.api.sendTo(2, "ping", "some data");