зеркало из https://github.com/electron/electron.git
Expose loadURL for the webview tag.
This commit is contained in:
Родитель
2e8a2c3a7f
Коммит
7192a8517b
|
@ -350,6 +350,7 @@ var registerWebViewElement = function() {
|
|||
// Public-facing API methods.
|
||||
methods = [
|
||||
'getURL',
|
||||
'loadURL',
|
||||
'getTitle',
|
||||
'isLoading',
|
||||
'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()`
|
||||
|
||||
Returns URL of guest page.
|
||||
|
|
Загрузка…
Ссылка в новой задаче