Last active
December 16, 2015 22:19
-
-
Save bittercoder/5506001 to your computer and use it in GitHub Desktop.
Turns out there's a maximum limit on setInterval after which it will fire immediately, rather then what you expect (which is to never fire) on chrome/firefox.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = function() { | |
alert('bang!'); | |
} | |
var signedIntMax = 2147483647; | |
var signedIntMaxPlus1 = signedIntMax+1; // will cause bang immediately on webkit/firefox but not IE | |
setInterval(a, signedIntMaxPlus1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment