src/crosstab.js
function (iters) {
                    var diff = util.now() - start;

                    if (!setupComplete) {
                        if (iters <= 0 && diff > PING_TIMEOUT) {
                            frozenTabEnvironmentDetected();
                            util.events.emit('setupComplete');
                        } else {
                            timeout = setTimeout(function () {
                                recursiveTimeout(iters - 1);
                            }, 5);
                        }
                    }
                }
function (iters) {
                    var diff = util.now() - start;

                    if (!setupComplete) {
                        if (iters <= 0 && diff > PING_TIMEOUT) {
                            frozenTabEnvironmentDetected();
                            util.events.emit('setupComplete');
                        } else {
                            timeout = setTimeout(function () {
                                recursiveTimeout(iters - 1);
                            }, 5);
                        }
                    }
                }
function ( iters ) { var diff = util . now ( ) - start ; if ( ! setupComplete ) { if ( iters <= 0 && diff > PING_TIMEOUT ) { frozenTabEnvironmentDetected ( ) ; util . events . emit ( 'setupComplete' ) ; } else { timeout = setTimeout ( function ( ) { recursiveTimeout ( iters - 1 ) ; } , 5 ) ; } } }
There is a nested timeout here. We'll give it 100ms timeout, with iters "yields" to the event loop. So at least iters number of blocks of javascript will be able to run covering at least 100ms
There is a nested timeout here . We ll give it 100ms timeout with iters yields to the event loop . So at least iters number of blocks of javascript will be able to run covering at least 100ms