You’re reading the English version of this content since no translation exists yet for this locale. Help us translate this article!

The Event() constructor creates a new Event.


new Event(typeArg[, eventInit]);


This is a DOMString representing the name of the event.
eventInit Optional
This is an EventInit dictionary, having the following optional fields:
  • bubbles: a Boolean indicating whether the event bubbles. The default is false.
  • cancelable: a Boolean indicating whether the event can be cancelled. The default is false.
  • composed: a Boolean indicating whether the event will trigger listeners outside of a shadow root (see Event.composed for more details). The default is false.


// create a look event that bubbles up and cannot be canceled

var evt = new Event("look", {"bubbles":true, "cancelable":false});

// event can be dispatched from any element, not only the document


Specification Status Comment
The definition of 'Event()' in that specification.
Living Standard Initial definition

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Event() constructorChrome Full support 15Edge Full support YesFirefox Full support 11IE No support NoOpera Full support 11.6Safari Full support 6WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 14Opera Android Full support 12Safari iOS Full support 6Samsung Internet Android ?


Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also