Перевод не завершен. Пожалуйста, помогите перевести эту статью с английского.

The Event() constructor creates a new Event.


 event = new Event(typeArg, eventInit);


Is a DOMString representing the name of the event.
eventInit Необязательный
Is an EventInit dictionary, having the following fields:
  • "bubbles": (Optional) A Boolean indicating whether the event bubbles. The default is false.
  • "cancelable": (Optional) A Boolean indicating whether the event can be canceled. The default is false.
  • "composed": (Optional) A Boolean indicating whether the event will trigger listeners outside of a shadow root. 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 elmement, not only the document


Specification Status Comment
Определение 'Event()' в этой спецификации.
Живой стандарт Initial definition.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
BasicSupport 15.0 11 (11) Нет 11.60 Nightly build (535.2)
Feature Android Android Webview Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile Chrome for Android
Basic support ? (Да) 11.0 (11) ? ? ? (Да)

See also

Метки документа и участники

 Внесли вклад в эту страницу: ilyacuc
 Обновлялась последний раз: ilyacuc,