From 01f06431423195891f6f6f63f3135d83ec8eca20 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 25 Sep 2015 09:34:04 +0800 Subject: [PATCH] Fix inconsistent docs: downloadItem.getURL() => downloadItem.getUrl() --- docs/api/download-item.md | 2 +- docs/api/session.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }); }); -- 2.43.0