ElectronApp.on('open-file') method
ElectronApp › on(‘open-file’)
Unofficial
Registers a listener for theopen-file event.Emitted when the user wants to open a file with the application. macOS only.
Signature:
on(event: "open-file", listener: (event: ElectronEvent, path: string) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| event | "open-file" | The event name. |
| listener | (event: ElectronEvent, path: string) => void | The event handler. |
Returns: this — This ElectronApp instance.