docs: clarify open-url not preventable (#37564)

docs: clarify open-url not preventable
This commit is contained in:
Shelley Vohr 2023-03-14 14:17:28 +01:00 committed by GitHub
parent 3b69a542fb
commit e480cb7103
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,8 +127,6 @@ Emitted when the user wants to open a URL with the application. Your application
`Info.plist` file must define the URL scheme within the `CFBundleURLTypes` key, and `Info.plist` file must define the URL scheme within the `CFBundleURLTypes` key, and
set `NSPrincipalClass` to `AtomApplication`. 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` 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 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 is being opened to handle a URL. If you register the listener in response to a