📝 Match destructuring style
[ci skip]
This commit is contained in:
parent
5787bb0226
commit
4d7296e1db
24 changed files with 37 additions and 39 deletions
|
@ -23,7 +23,7 @@ processes:
|
|||
|
||||
```javascript
|
||||
// In main process.
|
||||
const { ipcMain } = require('electron');
|
||||
const {ipcMain} = require('electron');
|
||||
ipcMain.on('asynchronous-message', (event, arg) => {
|
||||
console.log(arg); // prints "ping"
|
||||
event.sender.send('asynchronous-reply', 'pong');
|
||||
|
@ -37,7 +37,7 @@ ipcMain.on('synchronous-message', (event, arg) => {
|
|||
|
||||
```javascript
|
||||
// In renderer process (web page).
|
||||
const { ipcRenderer } = require('electron');
|
||||
const {ipcRenderer} = require('electron');
|
||||
console.log(ipcRenderer.sendSync('synchronous-message', 'ping')); // prints "pong"
|
||||
|
||||
ipcRenderer.on('asynchronous-reply', (event, arg) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue