Why is there a noticeable delay between WebChromeClient.onProgressChanged and jquery's $(document).ready() callbacks?
I have a webview, and I am loading a webpage in it where I do call a JS interface function impl开发者_运维技巧emented in native app, in document.ready. And I also handle WebChromeClient.onProgressChanged, and do some operations when the progress reaches 100%.
What I do find is that onProgressChanged reaches 100% first, and there is a few seconds delay before the JS interface handler called in document.ready is invoked. The webpage being loaded is small, and has no resources at all. This behavior shows up as unacceptable user experience. Why is there such a delay, and what is the right Webchromeclient callback/Jquery method to use to minimize this delay?
精彩评论