I would like to put
var minValue = 0;
if ( typeof callback == 'function' ) {
setTimeout( callback, minValue );
}
this code when I implement callback function with JavaScript.
But I’ve found that modern browsers and some old browsers
have different minimum timeout value.
I know that Zero cannot be minimum value.
What would be minimum value of setTimeout for
modern browsers and some old browsers for compatibility issues?
I think that 10 will be the most reliable minimum in all browser, since I’ve seen a lot of codes using it.
However, 4ms is the minimum for HTML5