@@ -53,30 +53,30 @@ The `ipcMain` module has the following method to listen for events:
5353* ` channel ` String - The event name.
5454* ` callback ` Function
5555
56- When the event occurs the ` callback ` is called with an ` event ` object and a
57- message, ` arg ` .
58-
59- Once done listening for messages, if you longer want to activate this callback
60- and for whatever reason can't merely stop sending messages on the channel, you
61- can use:
56+ When the event occurs the ` callback ` is called with an ` event ` object and
57+ arbitrary arguments.
6258
6359### ` ipcMain.removeListener(channel, callback) `
6460
6561* ` channel ` String - The event name.
6662* ` callback ` Function - The reference to the same function that you used for
6763 ` ipcMain.on(channel, callback) `
6864
69- Alternatively, if you don't have access to the same callback, you can use:
65+ Once done listening for messages, if you no longer want to activate this
66+ callback and for whatever reason can't merely stop sending messages on the
67+ channel, this function will remove the callback handler for the specified
68+ channel.
7069
7170### ` ipcMain.removeAllListeners(channel) `
7271
7372* ` channel ` String - The event name.
7473
75- This has the expected effect of removing * all* handlers to this ipc channel.
74+ This removes * all* handlers to this ipc channel.
75+
76+ ### ` ipcMain.once(channel, callback) `
7677
77- Because of this class' inheritance from the ` EventEmitter ` node class, you can
78- also use ` ipcMain.once(channel, callback) ` to fire handlers meant to occur only
79- once, as in, they won't be activated after one call of ` callback `
78+ Use this in place of ` ipcMain.on() ` to fire handlers meant to occur only once,
79+ as in, they won't be activated after one call of ` callback `
8080
8181## IPC Event
8282
0 commit comments