<!DOCTYPE html><html> <head> <meta charset=&34;> <meta http-equiv=&34; content=&39;self&39;unsafe-inline&34;> <title>Hello World!</title> </head> <body> <h1>Hello World!</h1> <button type=&34; id=&34;>Talk to main process</button><br> <!-- All of the Node.js APIs are available in this renderer process. --> We are using Node.js <strong><script>document.write( process.versions.node)</script></strong>, and Electron <strong><script>document.write( process.versions.electron )</script></strong>. <script> // You can also require other files to run in this process require(&39;) </script> </body></html>
// This file is required by the index.html file and will// be executed in the renderer process for that window.// All of the Node.js APIs are available in this process.const { ipcRenderer } = require(&39;)let i = 1setInterval( () => { console.log(i) i++}, 1000)document.getElementById(&39;).addEventListener(&39;, e => { // ipcRenderer.send( &39;, &39;) let response = ipcRenderer.sendSync( &39;, &39;) console.log(response)})ipcRenderer.on( &39;, (e, args) => { console.log(args)})ipcRenderer.on( &39;, (e, args) => { console.log(args)})
// Modulesconst {app, BrowserWindow, ipcMain} = require(&39;)// Keep a global reference of the window object, if you don&39;index.html&39;did-finish-load&39;mailbox&39;Ray&39;ray@stackacademy.tv&39;closed&39;sync-message&39;A sync response from the main process&39;channel1&39;channel1-response&39;Message received on &34;. Thank you!&39;ready&39;window-all-closed&39;darwin&39;activate', () => { if (mainWindow === null) createWindow()})