Is there a way to exit a javascript script without tracking back through all called functions with return. Sort of like a gasp GOTO. Or maybe setting an infinite timer that does not take up too much CPU time. I want to use this to stop processing and warn user on unexpected exception/error cases.
-
1why would you want to do this?Daniel A. White– Daniel A. White2012-01-31 13:54:26 +00:00Commented Jan 31, 2012 at 13:54
-
As far as i know, there is no exit function.user1150525– user11505252012-01-31 13:59:40 +00:00Commented Jan 31, 2012 at 13:59
-
1The only way to make JavaScript in a browser stop running is to use an "alert()" or "confirm()" dialog.Pointy– Pointy2012-01-31 14:02:12 +00:00Commented Jan 31, 2012 at 14:02
-
Pointy: after alert() javascript process still continues so how you stop that process ?!Muflix– Muflix2015-09-10 13:12:53 +00:00Commented Sep 10, 2015 at 13:12
Add a comment
|