This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Creates a new event, which must then be initialized by calling its initEvent() method.

Do not use this method anymore as it is deprecated.

Instead use specific event constructors, like Event(). The page on Creating and triggering events gives more information about the way to use these.


A string indicating the event type to create.

This method returns a new DOM Event object of the specified type, which must be initialized before use.


var newEvent = document.createEvent("UIEvents");


Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome No support NoEdge ? Firefox ? IE ? Opera No support NoSafari ? WebView Android No support NoChrome Android No support NoEdge Mobile ? Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android ?


No support  
No support
Compatibility unknown  
Compatibility unknown

See also

Document Tags and Contributors

Contributors to this page: urty5656, fscholz, vrana, teoli, kscarfone, Cobra, Sheppy, Matej Lednar
Last updated by: urty5656,