CordovaWebView:TIMEOUT错误 [英] CordovaWebView: TIMEOUT ERROR
本文介绍了CordovaWebView:TIMEOUT错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的phonegap应用程序中实现jquery.min.js,但它显示我CordovaWebView超时错误。
我也试过了
I am implementing jquery.min.js in my phonegap app but it is showing me the CordovaWebView time out error. I have also tried
super.setIntegerProperty("loadUrlTimeoutValue", 10000);
但它只是花费时间,在那之后,相同的CordovaWebView:TIMEOUT ERROR!来了。
请提供适当的解决方案。
but it is just taking the time and after that time ,the same "CordovaWebView: TIMEOUT ERROR!" is coming. Please provide me with proper solution.
推荐答案
我猜你的主脚本太长,无法执行:
I guess your main script is too long to execute :
//code executed after the loading of the page (if your using jquery)
$(function() {
//if this method is too heavy and takes too long to execute, it will trigger the TIMEOUT ERROR.
doSomeStuff();
});
不会希望在此方法上添加超时,以便让应用程序启动,然后
Won't may want to add a timeout on this method in order to let the application launch, then start your heavy script (you may want to display a loading image or something like that).
代码段:
//code executed after the loading of the page
$(function() {
//in mobile environment, this timeout leaves time for the app to launch before we start any heavy process.
setTimeout(function(){
doSomeStuff();
},100);
});
这篇关于CordovaWebView:TIMEOUT错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文