code: 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);
    }
docs: JSDOM fires DCL event on document but not on window