Merge pull request #4186 from CharlieHess/webview-load-url
Expose loadURL for the webview tag.
This commit is contained in:
commit
56e8ddbdaf
2 changed files with 12 additions and 0 deletions
|
@ -346,6 +346,7 @@ var registerWebViewElement = function() {
|
||||||
// Public-facing API methods.
|
// Public-facing API methods.
|
||||||
methods = [
|
methods = [
|
||||||
'getURL',
|
'getURL',
|
||||||
|
'loadURL',
|
||||||
'getTitle',
|
'getTitle',
|
||||||
'isLoading',
|
'isLoading',
|
||||||
'isWaitingForResponse',
|
'isWaitingForResponse',
|
||||||
|
|
|
@ -171,6 +171,17 @@ webview.addEventListener("dom-ready", function() {
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `<webview>.loadURL(url[, options])`
|
||||||
|
|
||||||
|
* `url` URL
|
||||||
|
* `options` Object (optional), properties:
|
||||||
|
* `httpReferrer` String - A HTTP Referrer url.
|
||||||
|
* `userAgent` String - A user agent originating the request.
|
||||||
|
* `extraHeaders` String - Extra headers separated by "\n"
|
||||||
|
|
||||||
|
Loads the `url` in the webview, the `url` must contain the protocol prefix,
|
||||||
|
e.g. the `http://` or `file://`.
|
||||||
|
|
||||||
### `<webview>.getURL()`
|
### `<webview>.getURL()`
|
||||||
|
|
||||||
Returns URL of guest page.
|
Returns URL of guest page.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue