Use emulated dispatchEvent for EventTarget.prototype.dispatchEvent