CustomEvent

The CustomEvent interface represents events initialized by an application for any purpose.

Note: This feature is available in Web Workers

Event CustomEvent

Constructor

CustomEvent()

Creates a new CustomEvent.

Properties

This interface inherits properties from its parent, Event.

CustomEvent.detail Read only

Returns any data passed when initializing the event.

Methods

This interface inherits methods from its parent, Event.

CustomEvent.initCustomEvent()

Initializes a CustomEvent object. If the event has already being dispatched, this method does nothing.

Specifications

Specification
DOM Standard
# interface-customevent

Browser compatibility

BCD tables only load in the browser

See also