diff --git a/sysend.js b/sysend.js index 4b9a7c1..c543906 100644 --- a/sysend.js +++ b/sysend.js @@ -452,7 +452,11 @@ sysend.emit('__primary__'); } // ------------------------------------------------------------------------- - if (document.readyState === 'complete') { + function document_ready() { + return ['interactive', 'complete'].indexOf(document.readyState) !== -1; + } + // ------------------------------------------------------------------------- + if (document_ready()) { init(); } else { window.addEventListener('load', function() {