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
This commit is contained in:
Stuart Schechter 2022-07-27 08:00:35 -04:00 committed by GitHub
parent b0c6fb5152
commit 63593ffb22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: