开发者

If an iframe has an infinite loop, would it stop functions of the parent window?

开发者 https://www.devze.com 2023-01-06 11:23 出处:网络
What my understanding is that functions in an iframe are \"independent\" on the parent window. So I think if there is an infinite loop in the script of the frame, the parent window should not be inter

What my understanding is that functions in an iframe are "independent" on the parent window. So I think if there is an infinite loop in the script of the frame, the parent window should not be interfered. I implemented a program to test it, but found the infinite loop开发者_如何学运维 blocks the parent window's functions. Is the program or my understanding wrong?


The parent doc is independent of the iframe in the time of rendering. But if there is an infinite loop in the iframe document/page, the browser might have been busy running that code and not getting time to do anything else. See whether you are overwhelming the browser.


Good Browsers recognize infinite loops, so throw away your Internet Explorer and get a browser and you'll never again get such problems.

0

精彩评论

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