I've come up with an simple question. I would like to get the DOMDocument of the Android webview.
What I've done to solve this:
- Google this
- Reading the docs
- wrote this question
What I've found is this:
- Over hundred of people who say you can't access this.
- While working the webview layout didn't get any children in the debug view of an IDE.
And here more questions of mine:
- Isn't there any way to get this object?
- Which object has an reference to this object or owns the DOMDocument?
- Does the webview just reinterprete the document into a layout or does the webview realy draws the document?
Thanks to everyone who can give a hint or answer these questions.
EDIT: As mentioned I could use a js interface but I do not use this to keep the js environment clean and do not create any variable which could create an issuse with the javascript on webpage.
WebView.evaluateJavascript(
"function(){return "JSON";})();",
new ValueCallback<String>(){
public void onRecieveValue(String p1){
//TODO : CODE HERE
}
});