ElectronApp.on('second-instance') method
ElectronApp › on(‘second-instance’)
Unofficial
Registers a listener for thesecond-instance event.Emitted inside the primary instance when a second instance is executed and calls
requestSingleInstanceLock. Signature:
on(event: "second-instance", listener: (event: ElectronEvent, argv: string[], workingDirectory: string, additionalData: unknown, ackCallback: unknown) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| event | "second-instance" | The event name. |
| listener | (event: ElectronEvent, argv: string[], workingDirectory: string, additionalData: unknown, ackCallback: unknown) => void | The event handler. |
Returns: this — This ElectronApp instance.