If an iframe has an infinite loop, would it stop functions of the parent window?
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.
精彩评论