\n\n \n\n\n[JS]\nfunction frame(timestamp) { \n // return if halt=true, or...\n}\n\n// ...cancel\nfunction halt() { stopAnimationFrame / clear Timeout/Interval }","answerCount":1,"upvoteCount":6,"suggestedAnswer":[{"@type":"Answer","text":"xorry no idea","upvoteCount":1}]} }
+ 6

[JS] Prevent error console from getting too busy with timers [TIP]

<script> tags share context but run independently, so you can step on your own feet if a timer interacts with a console. You may want to cancel timers on first error: [HTML] <head> <!-- Own block, ideally imported as the first script --> <script>window.onerror = function() { halt() } </script> <!-- [JS] auto-insertion point --> </head> [JS] function frame(timestamp) { // return if halt=true, or... } // ...cancel function halt() { stopAnimationFrame / clear Timeout/Interval }

13th Jul 2017, 11:52 PM
Kirk Schafer
Kirk Schafer - avatar
1 Answer
+ 1
xorry no idea
20th Jul 2017, 6:28 PM
stephen haokip
stephen haokip - avatar