ElectronMessagePortMain.on('close') method
ElectronMessagePortMain › on(‘close’)
Unofficial
Registers a listener for theclose event, emitted when the remote end becomes disconnected. Signature:
on(event: "close", listener: () => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| event | "close" | The event name. |
| listener | () => void | Called when the port closes. |
Returns: this — This message port instance.