I want to inject html into the same Android webview more than once. First call to inject some javascript, and second call to inject html and more javascript. In my attempts so far the second injection overwrites the first one. So I'm wondering if this is at all possible?
Asked
Active
Viewed 1,968 times
0
-
You can call javascript anytime using `loadurl("your javascript code here");` and to add more html, you will have to call a javascript function only to add it in some class or div, if you `loadurl("html");` then it will anyway overwrite your previous html. – Darpan Dec 29 '14 at 12:31
-
What do you mean I will have to call a javascript function only? – Vas Dec 29 '14 at 15:13
1 Answers
0
You can get html from WebView and then update like you want. In this case you dodn't lose any information from WebView.
See:
-
1So you're suggesting get html from the webview, update it however I need and inject it back? – Vas Dec 29 '14 at 15:14