diff --git a/Focusgroup/focusgroup_polyfill.js b/Focusgroup/focusgroup_polyfill.js index 248be0fe..ae067543 100644 --- a/Focusgroup/focusgroup_polyfill.js +++ b/Focusgroup/focusgroup_polyfill.js @@ -276,9 +276,9 @@ function OneTimeInit() { const focusgroupManagers = new WeakMap(); -if ( document.readyState != "complete" ) { - document.addEventListener('DOMContentLoaded', OneTimeInit, { once: true } ); +if ( document.readyState != "loading" ) { + OneTimeInit(); // run right now. } else { - OneTimeInit(); // run right now. + document.addEventListener('DOMContentLoaded', OneTimeInit, { once: true } ); }