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

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