Add some documentation in app.md.

This commit is contained in:
Charlie Hess 2016-04-29 22:25:09 -07:00
parent 195940292d
commit cea1b49db0

View file

@ -108,8 +108,20 @@ Returns:
* `event` Event * `event` Event
* `hasVisibleWindows` Boolean * `hasVisibleWindows` Boolean
Emitted when the application is activated, which usually happens when clicks on Emitted when the application is activated, which usually happens when the user clicks on
the applications's dock icon. the application's dock icon.
### Event: 'continue-activity' _OS X_
Returns:
* `event` Event
* `type` String - A string identifying the event. Maps to [`NSUserActivity.activityType`](https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSUserActivity_Class/index.html#//apple_ref/occ/instp/NSUserActivity/activityType).
* `userInfo` Object - Contains app-specific state stored by the activity on another device.
Emitted during [handoff](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/Handoff/HandoffFundamentals/HandoffFundamentals.html) when an activity from a different device wants to be
resumed. You should call `event.preventDefault()` if you want to handle this
event.
### Event: 'browser-window-blur' ### Event: 'browser-window-blur'
@ -482,6 +494,16 @@ app.on('ready', function() {
}); });
``` ```
### `app.setUserActivity(type, userInfo)` _OS X_
* `type` String - Uniquely identifies the activity. It's recommended to use a
reverse-DNS string.
* `userInfo` Object - Contains app-specific state stored by the activity on
another device.
Creates an `NSUserActivity` and sets it as the current activity. The activity
is eligible for [handoff](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/Handoff/HandoffFundamentals/HandoffFundamentals.html) to another device afterward.
### `app.setAppUserModelId(id)` _Windows_ ### `app.setAppUserModelId(id)` _Windows_
* `id` String * `id` String