Header menu logo fable-electron-docs-api

IOnOpenFile Type

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ Emitted when the user wants to open a file with the application. The open-file event is usually emitted when the application is already open and the OS wants to reuse the application to open the file. open-file is also emitted when a file is dropped onto the dock and the application is not yet running. Make sure to listen for the open-file event very early in your application startup to handle this case (even before the ready event is emitted).You should call event.preventDefault() if you want to handle this event.On Windows, you have to parse process.argv (in the main process) to get the filepath.

Instance members

Instance member Description

this.event

Full Usage: this.event

Modifiers: abstract

this.path

Full Usage: this.path

Modifiers: abstract

Type something to start searching.