]> khamidou — GitHub mirrors - electron.git/commitdiff
Update app.md to document how open-file is emitted
authorBenjamin Pasero <benjamin.pasero@gmail.com>
Fri, 12 Jun 2015 10:37:53 +0000 (12:37 +0200)
committerBenjamin Pasero <benjamin.pasero@gmail.com>
Fri, 12 Jun 2015 10:37:53 +0000 (12:37 +0200)
On Mac, open-file is also emitted when the application is not yet running.

docs/api/app.md

index 31fa1c6161018088e4bc20df04656339656ad5c6..2d0e8219548486824b3c77ed6acb448fc65ab9d8 100644 (file)
@@ -62,9 +62,7 @@ Emitted when application is quitting.
 * `event` Event
 * `path` String
 
-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.
+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).
 
 You should call `event.preventDefault()` if you want to handle this event.