Is there any way to manually fire the DOMContentLoaded
event?
I'm trying to write a unit-test for some client-side JavaScript which does some stuff on the DOMContentLoaded
event.
The following did not work:
document.dispatchEvent("DOMContentLoaded")
or
document.body.dispatchEvent("DOMContentLoaded")