We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

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

Syntax

document.createEvent(type) 
type
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.

Example

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

Specification

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No ? ? ? No ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No ? ? No ? ?

Document Tags and Contributors

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