Update app.md to document how open-file is emitted

On Mac, open-file is also emitted when the application is not yet running.
This commit is contained in:
Benjamin Pasero 2015-06-12 12:37:53 +02:00
parent 8b8a6aea74
commit 7da3e84369

View file

@ -62,9 +62,7 @@ Emitted when application is quitting.
* `event` Event * `event` Event
* `path` String * `path` String
Emitted when user wants to open a file with the application, it usually Emitted when user wants to open a file with the application, it usually happens when the application is already opened and then OS wants to reuse the application to open file. But it is also emitted when a file is dropped onto the dock and the application is not yet running. Make sure to liste to open-file very early in your application startup to handle this case (even before the ready event is emitted).
happens when the application is already opened and then OS wants to reuse the
application to open file.
You should call `event.preventDefault()` if you want to handle this event. You should call `event.preventDefault()` if you want to handle this event.