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

As far as I understand, the functions in the iframe are "independent" in the parent window. Therefore, I think that if there is an infinite loop in the frame script, the parent window should not interfere. I implemented a program for testing, but found that an infinite loop blocks the functions of the parent window. Is the program or my understanding wrong?

+3
source share
2 answers

The parent doc is not dependent on iframe during rendering. But if there is an infinite loop in the iframe document / page, the browser may have been busy running this code and did not have time to do anything else. See if you are suppressing the browser.

+3
source

Good browsers recognize endless loops, so drop your Internet Explorer and get a browser, and you will never run into such problems again.

-1
source

Source: https://habr.com/ru/post/1753464/


All Articles