src/document.js
function windowLoaded(event) {
    document.removeEventListener('DOMContentLoaded', windowLoaded);

    // JSDom > 7.1 does not allow re-dispatching the same event, so
    // a copy of the event needs to be created for the new dispatch
    const windowContentLoaded = document.createEvent('HTMLEvents');
    windowContentLoaded.initEvent('DOMContentLoaded', false, false);
    window.dispatchEvent(windowContentLoaded);
  }
function windowLoaded(event) {
    document.removeEventListener('DOMContentLoaded', windowLoaded);

    // JSDom > 7.1 does not allow re-dispatching the same event, so
    // a copy of the event needs to be created for the new dispatch
    const windowContentLoaded = document.createEvent('HTMLEvents');
    windowContentLoaded.initEvent('DOMContentLoaded', false, false);
    window.dispatchEvent(windowContentLoaded);
  }
function windowLoaded ( event ) { document . removeEventListener ( 'DOMContentLoaded' , windowLoaded ) ; // JSDom > 7.1 does not allow re-dispatching the same event, so // a copy of the event needs to be created for the new dispatch const windowContentLoaded = document . createEvent ( 'HTMLEvents' ) ; windowContentLoaded . initEvent ( 'DOMContentLoaded' , false , false ) ; window . dispatchEvent ( windowContentLoaded ) ; }
JSDOM fires DCL event on document but not on window
JSDOM fires DCL event on document but not on window