Merge branch 'master' into linux

Conflicts:
	atom.gyp
	vendor/apm
	vendor/brightray
This commit is contained in:
Cheng Zhao 2014-02-14 13:17:00 +00:00
commit 4051d2ebdb
85 changed files with 611 additions and 473 deletions

View file

@ -1,42 +1,42 @@
# auto-updater
`auto-updater` module is a simple wrap around the Sparkle framework, it
provides auto update service for the application.
The `auto-updater` module is a simple wrap around the
[Squirrel](https://github.com/Squirrel/Squirrel.Mac) framework, you should
follow Squirrel's instructions on setting the server.
Before using this module, you should edit the `Info.plist` following
https://github.com/andymatuschak/Sparkle/wiki.
## Event: checking-for-update
## Event: will-install-update
Emitted when checking for update has started.
## Event: update-available
Emitted when there is an available update, the update would be downloaded
automatically.
## Event: update-not-available
Emitted when there is no available update.
## Event: update-downloaded
* `event` Event
* `version` String
* `continueUpdate` Function
This event is emitted when the update is found and going to be installed.
Calling `event.preventDefault()` would pause it, and you can call
`continueUpdate` to continue the update.
## Event: ready-for-update-on-quit
* `event` Event
* `version` String
* `releaseNotes` String
* `releaseName` String
* `releaseDate` Date
* `updateUrl` String
* `quitAndUpdate` Function
This event is emitted when user chose to delay the update until the quit.
Calling `quitAndUpdate()` would quit the application and install the update.
Emitted when update has been downloaded, calling `quitAndUpdate()` would restart
the application and install the update.
## autoUpdater.setFeedUrl(url)
* `url` String
## autoUpdater.setAutomaticallyChecksForUpdates(flag)
* `flag` Boolean
## autoUpdater.setAutomaticallyDownloadsUpdates(flag)
* `flag` Boolean
Set the `url` and initialize the auto updater. The `url` could not be changed
once it is set.
## autoUpdater.checkForUpdates()
## autoUpdater.checkForUpdatesInBackground()
Ask the server whether there is an update, you have to call `setFeedUrl` before
using this API.

View file

@ -18,9 +18,6 @@ win.show();
You can also create a window without chrome by using
[Frameless Window](frameless-window.md) API.
**Note:** Be careful not to use `window` as the variable name.
## Class: BrowserWindow
`BrowserWindow` is an
@ -44,11 +41,31 @@ You can also create a window without chrome by using
* `show` Boolean - Whether window should be shown when created
* `frame` Boolean - Specify `false` to create a
[Frameless Window](frameless-window.md)
* `node-integration` String - Can be `all`, `except-iframe`,
`manual-enable-iframe` or `disable`.
Creates a new `BrowserWindow` with native properties set by the `options`.
Usually you only need to set the `width` and `height`, other properties will
have decent default values.
By default the `node-integration` option is `all`, which means node integration
is available to the main page and all its iframes. You can also set it to
`except-iframe`, which would disable node integration in all iframes, or
`manual-enable-iframe`, which is like `except-iframe`, but would enable iframes
whose name is suffixed by `-enable-node-integration`. And setting to `disable`
would disable the node integration in both the main page and its iframes.
An example of enable node integration in iframe with `node-integration` set to
`manual-enable-iframe`:
```html
<!-- iframe with node integration enabled -->
<iframe name="gh-enable-node-integration" src="https://github.com"></iframe>
<!-- iframe with node integration disabled -->
<iframe src="http://jandan.net"></iframe>
```
### Event: 'page-title-updated'
* `event` Event