Skip to content

Commit 94e5018

Browse files
committed
Merge pull request electron#2898 from atom/fix-download-item-doc
Fix inconsistent docs: downloadItem.getURL() => downloadItem.getUrl()
2 parents 004d3ce + 4a64d1d commit 94e5018

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

atom/browser/api/atom_api_download_item.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct Converter<content::DownloadItem::DownloadState> {
3030
download_state = "cancelled";
3131
break;
3232
case content::DownloadItem::INTERRUPTED:
33-
download_state = "interrputed";
33+
download_state = "interrupted";
3434
break;
3535
default:
3636
break;

docs/api/download-item.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Emits when the `downloadItem` gets updated.
3939
* `interrupted` - An error broke the connection with the file server.
4040
4141
Emits when the download is in a terminal state. This includes a completed
42-
download, a cancelled download(via `downloadItem.cancel()`), and interrputed
42+
download, a cancelled download(via `downloadItem.cancel()`), and interrupted
4343
download that can't be resumed.
4444
4545
## Methods
@@ -66,7 +66,7 @@ Resumes the download that has been paused.
6666
6767
Cancels the download operation.
6868
69-
### `downloadItem.getURL()`
69+
### `downloadItem.getUrl()`
7070
7171
Returns a `String` represents the origin url where the item is downloaded from.
7272

docs/api/session.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Calling `event.preventDefault()` will cancel the download.
2828
```javascript
2929
session.on('will-download', function(event, item, webContents) {
3030
event.preventDefault();
31-
require('request')(item.getURL(), function(data) {
31+
require('request')(item.getUrl(), function(data) {
3232
require('fs').writeFileSync('/somewhere', data);
3333
});
3434
});

0 commit comments

Comments
 (0)