Skip to content

Commit

Permalink
docs: webview html example (#13932)
Browse files Browse the repository at this point in the history
* docs: webview html example

* Update WebView.yml

---------

Co-authored-by: Hans Knöchel <[email protected]>
  • Loading branch information
m1ga and hansemannn authored Oct 7, 2023
1 parent 66fe271 commit 58f868b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apidoc/Titanium/UI/WebView.yml
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,15 @@ properties:
The web view's content can also be set using the [data](Titanium.UI.WebView.data) or
[url](Titanium.UI.WebView.url) properties.
If you want to get the HTML content of a remote URL you can grab it with this `evalJS` call:
``` js
webview.addEventListener('load', function() {
webview.evalJS('document.documentElement.outerHTML.toString()', function(data) {
console.log(data);
});
});
```
See also: [data](Titanium.UI.WebView.data) and [url](Titanium.UI.WebView.url).
type: String

Expand Down

0 comments on commit 58f868b

Please sign in to comment.