Creates a new event, which must then be initialized by calling its initEvent()
method.
document.createEvent(type)
type
This method returns a new DOM Event
object of the specified type, which must be initialized before use.
var newEvent = document.createEvent("UIEvents");
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Event/createEvent