MDN wants to talk to developers like you: https://qsurvey.mozilla.com/s3/a3e7b5301fea

Creates a new event, which must then be initialized by calling its init() 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

Document Tags and Contributors

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