Delaying onDOMContentLoaded and onload events
While testing frontend issues, you may be confronted with verifying a feature's functionality while the document is still in parsing mode. That is before the DOMContentLoaded event was triggered. Or maybe the test needs to be run in between DOMContentLoaded an load events. Or some other weird stuff. Here's how…