But create a mock document this time, for dispatching the events (https://developer.mozilla.org/en-US/docs/DOM/DOMImplementation.createDocument) as we can no longer use jQuery's event dispatcher mechanism