Replace "Url" in API names with "URL"
This commit is contained in:
parent
8f56387bd9
commit
fbb8e61958
57 changed files with 251 additions and 212 deletions
|
@ -67,7 +67,7 @@ Returns:
|
|||
* `releaseNotes` String
|
||||
* `releaseName` String
|
||||
* `releaseDate` Date
|
||||
* `updateUrl` String
|
||||
* `updateURL` String
|
||||
|
||||
Emitted when an update has been downloaded.
|
||||
|
||||
|
@ -77,7 +77,7 @@ On Windows only `releaseName` is available.
|
|||
|
||||
The `autoUpdater` object has the following methods:
|
||||
|
||||
### `autoUpdater.setFeedUrl(url)`
|
||||
### `autoUpdater.setFeedURL(url)`
|
||||
|
||||
* `url` String
|
||||
|
||||
|
@ -86,7 +86,7 @@ once it is set.
|
|||
|
||||
### `autoUpdater.checkForUpdates()`
|
||||
|
||||
Asks the server whether there is an update. You must call `setFeedUrl` before
|
||||
Asks the server whether there is an update. You must call `setFeedURL` before
|
||||
using this API.
|
||||
|
||||
### `autoUpdater.quitAndInstall()`
|
||||
|
|
|
@ -11,7 +11,7 @@ win.on('closed', function() {
|
|||
win = null;
|
||||
});
|
||||
|
||||
win.loadUrl('https://github.com');
|
||||
win.loadURL('https://github.com');
|
||||
win.show();
|
||||
```
|
||||
|
||||
|
@ -613,9 +613,9 @@ Same as `webContents.print([options])`
|
|||
|
||||
Same as `webContents.printToPDF(options, callback)`
|
||||
|
||||
### `win.loadUrl(url[, options])`
|
||||
### `win.loadURL(url[, options])`
|
||||
|
||||
Same as `webContents.loadUrl(url[, options])`.
|
||||
Same as `webContents.loadURL(url[, options])`.
|
||||
|
||||
### `win.reload()`
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ const crashReporter = require('electron').crashReporter;
|
|||
crashReporter.start({
|
||||
productName: 'YourName',
|
||||
companyName: 'YourCompany',
|
||||
submitUrl: 'https://your-domain.com/url-to-submit',
|
||||
submitURL: 'https://your-domain.com/url-to-submit',
|
||||
autoSubmit: true
|
||||
});
|
||||
```
|
||||
|
@ -26,7 +26,7 @@ The `crash-reporter` module has the following methods:
|
|||
|
||||
* `productName` String, default: Electron.
|
||||
* `companyName` String, default: GitHub, Inc.
|
||||
* `submitUrl` String, default: http://54.249.141.255:1127/post.
|
||||
* `submitURL` String, default: http://54.249.141.255:1127/post.
|
||||
* URL that crash reports will be sent to as POST.
|
||||
* `autoSubmit` Boolean, default: `true`.
|
||||
* Send the crash report without user interaction.
|
||||
|
@ -57,7 +57,7 @@ ID.
|
|||
|
||||
## crash-reporter Payload
|
||||
|
||||
The crash reporter will send the following data to the `submitUrl` as `POST`:
|
||||
The crash reporter will send the following data to the `submitURL` as `POST`:
|
||||
|
||||
* `ver` String - The version of Electron.
|
||||
* `platform` String - e.g. 'win32'.
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -103,11 +103,11 @@ Creates a new `nativeImage` instance from a file located at `path`.
|
|||
Creates a new `nativeImage` instance from `buffer`. The default `scaleFactor` is
|
||||
1.0.
|
||||
|
||||
### `nativeImage.createFromDataUrl(dataUrl)`
|
||||
### `nativeImage.createFromDataURL(dataURL)`
|
||||
|
||||
* `dataUrl` String
|
||||
* `dataURL` String
|
||||
|
||||
Creates a new `nativeImage` instance from `dataUrl`.
|
||||
Creates a new `nativeImage` instance from `dataURL`.
|
||||
|
||||
## Instance Methods
|
||||
|
||||
|
@ -129,7 +129,7 @@ Returns a [Buffer][buffer] that contains the image's `PNG` encoded data.
|
|||
|
||||
Returns a [Buffer][buffer] that contains the image's `JPEG` encoded data.
|
||||
|
||||
### `image.toDataUrl()`
|
||||
### `image.toDataURL()`
|
||||
|
||||
Returns the data URL of the image.
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ const remote = require('electron').remote;
|
|||
const BrowserWindow = remote.require('electron').BrowserWindow;
|
||||
|
||||
var win = new BrowserWindow({ width: 800, height: 600 });
|
||||
win.loadUrl('https://github.com');
|
||||
win.loadURL('https://github.com');
|
||||
```
|
||||
|
||||
**Note:** for the reverse (access the renderer process from the main process),
|
||||
|
|
|
@ -8,7 +8,7 @@ instance of `BrowserWindow`. For example:
|
|||
const BrowserWindow = require('electron').BrowserWindow;
|
||||
|
||||
var win = new BrowserWindow({ width: 800, height: 600 });
|
||||
win.loadUrl("http://github.com");
|
||||
win.loadURL("http://github.com");
|
||||
|
||||
var session = win.webContents.session
|
||||
```
|
||||
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
@ -47,7 +47,7 @@ const BrowserWindow = require('electron').BrowserWindow;
|
|||
|
||||
var win = new BrowserWindow({ width: 800, height: 600 });
|
||||
|
||||
win.loadUrl('https://github.com');
|
||||
win.loadURL('https://github.com');
|
||||
|
||||
win.webContents.on('did-finish-load', function() {
|
||||
// Query all cookies.
|
||||
|
|
|
@ -25,7 +25,7 @@ var window = null;
|
|||
|
||||
app.on('ready', function() {
|
||||
window = new BrowserWindow({width: 800, height: 600});
|
||||
window.loadUrl('https://github.com');
|
||||
window.loadURL('https://github.com');
|
||||
});
|
||||
```
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ the [`BrowserWindow`](browser-window.md) object. An example of accessing the
|
|||
const BrowserWindow = require('electron').BrowserWindow;
|
||||
|
||||
var win = new BrowserWindow({width: 800, height: 1500});
|
||||
win.loadUrl("http://github.com");
|
||||
win.loadURL("http://github.com");
|
||||
|
||||
var webContents = win.webContents;
|
||||
```
|
||||
|
@ -32,7 +32,7 @@ Returns:
|
|||
* `event` Event
|
||||
* `errorCode` Integer
|
||||
* `errorDescription` String
|
||||
* `validatedUrl` String
|
||||
* `validatedURL` String
|
||||
|
||||
This event is like `did-finish-load` but emitted when the load failed or was
|
||||
cancelled, e.g. `window.stop()` is invoked.
|
||||
|
@ -61,8 +61,8 @@ Returns:
|
|||
|
||||
* `event` Event
|
||||
* `status` Boolean
|
||||
* `newUrl` String
|
||||
* `originalUrl` String
|
||||
* `newURL` String
|
||||
* `originalURL` String
|
||||
* `httpResponseCode` Integer
|
||||
* `requestMethod` String
|
||||
* `referrer` String
|
||||
|
@ -76,8 +76,8 @@ Emitted when details regarding a requested resource are available.
|
|||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `oldUrl` String
|
||||
* `newUrl` String
|
||||
* `oldURL` String
|
||||
* `newURL` String
|
||||
* `isMainFrame` Boolean
|
||||
* `httpResponseCode` Integer
|
||||
* `requestMethod` String
|
||||
|
@ -99,7 +99,7 @@ Emitted when the document in the given frame is loaded.
|
|||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `favicons` Array - Array of Urls
|
||||
* `favicons` Array - Array of URLs
|
||||
|
||||
Emitted when page receives favicon urls.
|
||||
|
||||
|
@ -133,7 +133,7 @@ Emitted when a user or the page wants to start navigation. It can happen when th
|
|||
`window.location` object is changed or a user clicks a link in the page.
|
||||
|
||||
This event will not emit when the navigation is started programmatically with
|
||||
APIs like `webContents.loadUrl` and `webContents.back`.
|
||||
APIs like `webContents.loadURL` and `webContents.back`.
|
||||
|
||||
Calling `event.preventDefault()` will prevent the navigation.
|
||||
|
||||
|
@ -198,7 +198,7 @@ Returns the `session` object used by this webContents.
|
|||
|
||||
See [session documentation](session.md) for this object's methods.
|
||||
|
||||
### `webContents.loadUrl(url[, options])`
|
||||
### `webContents.loadURL(url[, options])`
|
||||
|
||||
* `url` URL
|
||||
* `options` Object (optional), properties:
|
||||
|
@ -209,15 +209,15 @@ See [session documentation](session.md) for this object's methods.
|
|||
Loads the `url` in the window, the `url` must contain the protocol prefix,
|
||||
e.g. the `http://` or `file://`.
|
||||
|
||||
### `webContents.getUrl()`
|
||||
### `webContents.getURL()`
|
||||
|
||||
Returns URL of the current web page.
|
||||
|
||||
```javascript
|
||||
var win = new BrowserWindow({width: 800, height: 600});
|
||||
win.loadUrl("http://github.com");
|
||||
win.loadURL("http://github.com");
|
||||
|
||||
var currentUrl = win.webContents.getUrl();
|
||||
var currentURL = win.webContents.getURL();
|
||||
```
|
||||
|
||||
### `webContents.getTitle()`
|
||||
|
@ -447,7 +447,7 @@ const BrowserWindow = require('electron').BrowserWindow;
|
|||
const fs = require('fs');
|
||||
|
||||
var win = new BrowserWindow({width: 800, height: 600});
|
||||
win.loadUrl("http://github.com");
|
||||
win.loadURL("http://github.com");
|
||||
|
||||
win.webContents.on("did-finish-load", function() {
|
||||
// Use default printing options
|
||||
|
@ -524,7 +524,7 @@ An example of sending messages from the main process to the renderer process:
|
|||
var window = null;
|
||||
app.on('ready', function() {
|
||||
window = new BrowserWindow({width: 800, height: 600});
|
||||
window.loadUrl('file://' + __dirname + '/index.html');
|
||||
window.loadURL('file://' + __dirname + '/index.html');
|
||||
window.webContents.on('did-finish-load', function() {
|
||||
window.webContents.send('ping', 'whoooooooh!');
|
||||
});
|
||||
|
@ -660,7 +660,7 @@ when the DevTools has been closed.
|
|||
Returns true if the process of saving page has been initiated successfully.
|
||||
|
||||
```javascript
|
||||
win.loadUrl('https://github.com');
|
||||
win.loadURL('https://github.com');
|
||||
|
||||
win.webContents.on('did-finish-load', function() {
|
||||
win.webContents.savePage('/tmp/test.html', 'HTMLComplete', function(error) {
|
||||
|
|
|
@ -66,7 +66,7 @@ webFrame.setSpellCheckProvider("en-US", true, {
|
|||
});
|
||||
```
|
||||
|
||||
### `webFrame.registerUrlSchemeAsSecure(scheme)`
|
||||
### `webFrame.registerURLSchemeAsSecure(scheme)`
|
||||
|
||||
* `scheme` String
|
||||
|
||||
|
@ -76,14 +76,14 @@ Secure schemes do not trigger mixed content warnings. For example, `https` and
|
|||
`data` are secure schemes because they cannot be corrupted by active network
|
||||
attackers.
|
||||
|
||||
### `webFrame.registerUrlSchemeAsBypassingCsp(scheme)`
|
||||
### `webFrame.registerURLSchemeAsBypassingCSP(scheme)`
|
||||
|
||||
* `scheme` String
|
||||
|
||||
Resources will be loaded from this `scheme` regardless of the current page's
|
||||
Content Security Policy.
|
||||
|
||||
### `webFrame.registerUrlSchemeAsPrivileged(scheme)`
|
||||
### `webFrame.registerURLSchemeAsPrivileged(scheme)`
|
||||
|
||||
* `scheme` String
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ webview.addEventListener("dom-ready", function() {
|
|||
});
|
||||
```
|
||||
|
||||
### `<webview>.getUrl()`
|
||||
### `<webview>.getURL()`
|
||||
|
||||
Returns URL of guest page.
|
||||
|
||||
|
@ -402,7 +402,7 @@ Returns:
|
|||
|
||||
* `errorCode` Integer
|
||||
* `errorDescription` String
|
||||
* `validatedUrl` String
|
||||
* `validatedURL` String
|
||||
|
||||
This event is like `did-finish-load`, but fired when the load failed or was
|
||||
cancelled, e.g. `window.stop()` is invoked.
|
||||
|
@ -428,8 +428,8 @@ Corresponds to the points in time when the spinner of the tab stops spinning.
|
|||
Returns:
|
||||
|
||||
* `status` Boolean
|
||||
* `newUrl` String
|
||||
* `originalUrl` String
|
||||
* `newURL` String
|
||||
* `originalURL` String
|
||||
* `httpResponseCode` Integer
|
||||
* `requestMethod` String
|
||||
* `referrer` String
|
||||
|
@ -442,8 +442,8 @@ Fired when details regarding a requested resource is available.
|
|||
|
||||
Returns:
|
||||
|
||||
* `oldUrl` String
|
||||
* `newUrl` String
|
||||
* `oldURL` String
|
||||
* `newURL` String
|
||||
* `isMainFrame` Boolean
|
||||
|
||||
Fired when a redirect was received while requesting a resource.
|
||||
|
@ -466,7 +466,7 @@ url.
|
|||
|
||||
Returns:
|
||||
|
||||
* `favicons` Array - Array of Urls.
|
||||
* `favicons` Array - Array of URLs.
|
||||
|
||||
Fired when page receives favicon urls.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue