window.addEventListener('load', function () { // 5 s is enough for the module bundle to parse and React to mount even on // slow connections, while still being short enough to give quick feedback. setTimeout(function () { var root = document.getElementById('root'); if (root && root.childElementCount === 0) { document.getElementById('load-error').style.display = 'flex'; } }, 5000); });