Merge pull request #3672 from CharlieHess/web-contents-download-url

DownloadURL from webContents
This commit is contained in:
Cheng Zhao 2015-12-04 10:52:11 +08:00
commit afa8f8b166
6 changed files with 50 additions and 10 deletions

View file

@ -242,6 +242,13 @@ const options = {"extraHeaders" : "pragma: no-cache\n"}
webContents.loadURL(url, options)
```
### `webContents.downloadURL(url)`
* `url` URL
Initiates a download of the resource at `url` without navigating. The
`will-download` event of `session` will be triggered.
### `webContents.getURL()`
Returns URL of the current web page.