Event.createEvent()

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,