Skip to content

Event

Generated from idl/dom.webidl when the site was built at 7aa23e2.

Event is an interface in idl/dom.webidl, exposed in Window, Worker. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
Events Widely available Partial 66% 669 of 1009 subtests pass 14
Shadow DOM Widely available Partial 3.4% 26 of 756 subtests pass 2
constructor
constructor(DOMString type, optional EventInit eventInitDict = {});
int32_t niso_event_new(niso_dom* dom, const char* type, size_t type_len, const niso_event_init* event_init_dict, niso_handle* out);
attribute
readonly attribute DOMString type;
int32_t niso_event_get_type(niso_dom* dom, niso_handle self, niso_str* out);
attribute
readonly attribute EventTarget? target;
int32_t niso_event_get_target(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
readonly attribute EventTarget? srcElement;
int32_t niso_event_get_src_element(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
readonly attribute EventTarget? currentTarget;
int32_t niso_event_get_current_target(niso_dom* dom, niso_handle self, niso_handle* out);
operation Shadow DOM: Partial 3.4%
sequence<EventTarget> composedPath();
int32_t niso_event_composed_path(niso_dom* dom, niso_handle self, niso_handles* out);
const
const unsigned short NONE = 0;
const
const unsigned short CAPTURING_PHASE = 1;
const
const unsigned short AT_TARGET = 2;
const
const unsigned short BUBBLING_PHASE = 3;
attribute
readonly attribute unsigned short eventPhase;
int32_t niso_event_get_event_phase(niso_dom* dom, niso_handle self, uint16_t* out);
operation
undefined stopPropagation();
int32_t niso_event_stop_propagation(niso_dom* dom, niso_handle self);
attribute
attribute boolean cancelBubble;
int32_t niso_event_get_cancel_bubble(niso_dom* dom, niso_handle self, bool* out);
int32_t niso_event_set_cancel_bubble(niso_dom* dom, niso_handle self, bool value);
operation
undefined stopImmediatePropagation();
int32_t niso_event_stop_immediate_propagation(niso_dom* dom, niso_handle self);
attribute
readonly attribute boolean bubbles;
int32_t niso_event_get_bubbles(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean cancelable;
int32_t niso_event_get_cancelable(niso_dom* dom, niso_handle self, bool* out);
attribute
attribute boolean returnValue;
int32_t niso_event_get_return_value(niso_dom* dom, niso_handle self, bool* out);
int32_t niso_event_set_return_value(niso_dom* dom, niso_handle self, bool value);
operation
undefined preventDefault();
int32_t niso_event_prevent_default(niso_dom* dom, niso_handle self);
attribute
readonly attribute boolean defaultPrevented;
int32_t niso_event_get_default_prevented(niso_dom* dom, niso_handle self, bool* out);
attribute Shadow DOM: Partial 3.4%
readonly attribute boolean composed;
int32_t niso_event_get_composed(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean isTrusted;
int32_t niso_event_get_is_trusted(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute DOMHighResTimeStamp timeStamp;
int32_t niso_event_get_time_stamp(niso_dom* dom, niso_handle self, double* out);
operation
undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false);
int32_t niso_event_init_event(niso_dom* dom, niso_handle self, const char* type, size_t type_len, bool bubbles, bool cancelable);