Fix inconsistent docs: downloadItem.getURL() => downloadItem.getUrl()
This commit is contained in:
parent
a0638fe801
commit
01f0643142
2 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ Resumes the download that has been paused.
|
|||
|
||||
Cancels the download operation.
|
||||
|
||||
### `downloadItem.getURL()`
|
||||
### `downloadItem.getUrl()`
|
||||
|
||||
Returns a `String` represents the origin url where the item is downloaded from.
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Calling `event.preventDefault()` will cancel the download.
|
|||
```javascript
|
||||
session.on('will-download', function(event, item, webContents) {
|
||||
event.preventDefault();
|
||||
require('request')(item.getURL(), function(data) {
|
||||
require('request')(item.getUrl(), function(data) {
|
||||
require('fs').writeFileSync('/somewhere', data);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue