阅读背景:

在Javascript中监视长任务

来源:互联网 

I have a particular page that uses lots of widgets that have to be initialized by Javascript routines (around 400, it's a complex one). This takes some time (even 20 secs on slower machines). Now I was thinking I could show a progress indicator (a simple text field with a percentage label), instead of the page, but I discovered that even if I was updating it continuosly, the ongoing task blocks everything and I see no updates. So everything remains frozen until the heavy javascript task completes. I even done the following experiment, but freezes as well (and firefox says that the script is taking too long to complete...):I have a particular page that uses lots of widg




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: