开发者

What javascript executes on unload?

I'm working on an ASP.NET page that loads quite a lot of AJAX data into a jsTree. Enough so that I'd regularly get "A script on this page is causing your web browser to run slowly" warnings.

After quite a bit of work, I've managed to break up the getting of the data and the loading of it into the tree into small enough parts as to avoid the problem.

My problem now - if I've loaded enough data into the tree, and then exit the page (either by navigating to a different page, or by closing the browser), I get the "A script on this page is causing your web browser to run slowly".

Clearly, there's some code, somewhere, that's hooked into the tree, and that is running on unload, trying to do a bunch of unnecessary cleanup.

I've tried calling jsTree.destroy(), erasing the tree DOM, etc. But the problem is still there.

Does anyone have any ideas 开发者_JAVA技巧as to how I can figure out what code is running on unload(), so I can figure out a way to stop it?

I mean, the page is closing. Nothing of any significance is happening. But a lot of work is being done. Why?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜