From: Haojian Wu Date: Fri, 25 Sep 2015 01:34:04 +0000 (+0800) Subject: Fix inconsistent docs: downloadItem.getURL() => downloadItem.getUrl() X-Git-Tag: v0.33.2~2^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=01f06431423195891f6f6f63f3135d83ec8eca20;p=electron.git Fix inconsistent docs: downloadItem.getURL() => downloadItem.getUrl() --- diff --git a/docs/api/download-item.md b/docs/api/download-item.md index 722dc5d8..5097fde8 100644 --- a/docs/api/download-item.md +++ b/docs/api/download-item.md @@ -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. diff --git a/docs/api/session.md b/docs/api/session.md index ae0aacf4..64991ab7 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -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); }); });