Browse Source

docs: don't wait for ready event to register open-url listener (#35019)

* Update app.md

Add warning about late registration of the open-url event.

* Update app.md
Stuart Schechter 2 years ago
parent
commit
63593ffb22
1 changed files with 5 additions and 0 deletions
  1. 5 0
      docs/api/app.md

+ 5 - 0
docs/api/app.md

@@ -130,6 +130,11 @@ set `NSPrincipalClass` to `AtomApplication`.
 
 You should call `event.preventDefault()` if you want to handle this event.
 
+As with the `open-file` event, be sure to register a listener for the `open-url`
+event early in your application startup to detect if the the application being
+is being opened to handle a URL. If you register the listener in response to a
+`ready` event, you'll miss URLs that trigger the launch of your application.
+
 ### Event: 'activate' _macOS_
 
 Returns: