I am making Highlighter for Android in WebView.
For the highlighting purpose, in one example i am using JQuery and Rangy, in another pure Javascript and XPath. I am trying the same Highlight in Desktop Browsers also.
Please refer to the previous questions which i posted for the problems which i am facing during Highlighting...
-->> Problem when using Rangy (Not answered yet!)
So... from the responses to these question, i came to the conclusion that
the DOM structure of the loaded HTML in WebView is inconsistent and different than that of the same HTML page loaded in Desktop Browser mostly with reference to "TextNodes"..
To support this conclusion, i have created a jsFiddle (link in the question). But, i also think that WebView may not be changing the DOM structure but it surely returns incorrect TextNodes inside a div...
Now the question is, is there any way to stop this change in DOM structure of the HTML in WebView? Any insight guys?