0

I have a WebView with some web page in it. Now I want to retrieve complete HTML contents of what is inside the WebView.

I use loadUrl("javascript:...") and WebView's javascript interface feature to retrieve this HTML using something like this:

  • document.getElementsByTagName('html')[0].innerHTML / outerHTML
  • document.documentElement.outerHTML
  • ...

In each case I receive partial HTML contents - exactly first 10000 characters! So my question is - how do I get complete HTML content? Is it device-specific and, maybe there are workarounds?

Btw, web pages are created dynamically with javascript - I can't simply download the file from server.

Also, I tried printing HTML contents in javascript with console.log and found exactly the same behavior.

Thanks in advance!

myself
  • 482
  • 3
  • 21

1 Answers1

0

My mistake - it was not related to javascript, neither had to do with specific device I tested on.

So, in short, any of those js properties work correctly.

myself
  • 482
  • 3
  • 21