The snippet editor itself should not go unresponsive - if you run expensive code inside the snippet, it'll be in an iframe, which is a separate environment. The outer editor should remain as usable as ever. I've done this many times with infinite loops - "Save and insert into post" and then opening up the snippet again with "edit the above snippet" always works
@CertainPerformance It depends on which browser and what ends up actually happening within the browser's code. The browser may, or may not, run the iframe in a different/same process. That may, or may not, allow the user to continue to interact with the containing page. The browser may, or may not, offer to stop the currently executing script after it has been executing for X amount of time (potentially configurable by the user). The browser stopping the script may, or may not, result in completely disabling JavaScript in the page. All of the above happen depending on browser/config.
This site is intended for bugs, features, and discussion of Stack Overflow and the software that powers it. You must have an account on Stack Overflow to participate.
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
for
-loop with aconsole.log
, but I made a mistake and it printed infiniteundefined
s to the console... and it froze