Android WebView + loadUrl with javascript + onPageFinished = lag

前端 未结 2 766
情话喂你
情话喂你 2021-01-02 16:57

I have WebView which loads some page, when it\'s finished I apply some javascript magic to mess up with DOM. Everything is fine, page loads and onPageFinished I

2条回答
  •  忘掉有多难
    2021-01-02 17:26

    I don't think you're going to get an easy solution to this. All that Android can detect (like most browsers) is when the page is fully loaded, which means, all of it is downloaded. Javascript waits for it to be downloaded also, and THEN starts running. It's just the way it works. The only solution I can think of might just be in JQuery. I don't know much about it but there's usually solutions to things like this in it.

提交回复
热议问题