]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix inconsistent docs: downloadItem.getURL() => downloadItem.getUrl()
authorHaojian Wu <hokein.wu@gmail.com>
Fri, 25 Sep 2015 01:34:04 +0000 (09:34 +0800)
committerHaojian Wu <hokein.wu@gmail.com>
Fri, 25 Sep 2015 01:34:04 +0000 (09:34 +0800)
docs/api/download-item.md
docs/api/session.md

index 722dc5d8cf78b7413dfda5c5f43c2baff3d0e198..5097fde83f5cefb3803f3a6bc5c376a5473f002a 100644 (file)
@@ -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.
 
index ae0aacf4657ff80feeb70fb561a7d71092d70e90..64991ab7530c4e2a77c7cde7fe30c92816238eda 100644 (file)
@@ -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);
   });
 });