What is the opposite of javascript window.stop()

岁酱吖の 提交于 2020-05-27 07:03:13

问题


Once I've executed window.stop(), how can I resume default actions?

I need to make toggle/switch function, that once fired will run window.stop(), and with second run will recover window actions disabled by window.stop().


回答1:


I misunderstood before how window.stop() works.

I was wrong, there are no any "direct inbuilt" javascript method to reload ONLY THESE ELEMENTS stopped by window.stop(), so by this meaning it's impossible.

However, if it's needed, we can:

  • loop through each element on the site by our own function
  • cut website in sections, and load them one by one with ajax, so we will have to reload only specific sections --but I think either one of these it's too complex to implement to be worthy

So, to "pause website for moment" window.stop() it's not good choice.



来源:https://stackoverflow.com/questions/18935242/what-is-the-opposite-of-javascript-window-stop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!