Skip to content

MouseEvent

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

MouseEvent is an interface in idl/html.webidl, inheriting UIEvent, exposed in Window. 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
Mouse events Widely available Partial 71% 217 of 302 subtests pass 18
constructor
constructor(DOMString type, optional MouseEventInit eventInitDict = {});
int32_t niso_mouse_event_new(niso_dom* dom, const char* type, size_t type_len, const niso_mouse_event_init* event_init_dict, niso_handle* out);
attribute
readonly attribute double screenX;
int32_t niso_mouse_event_get_screen_x(niso_dom* dom, niso_handle self, double* out);
attribute
readonly attribute double screenY;
int32_t niso_mouse_event_get_screen_y(niso_dom* dom, niso_handle self, double* out);
attribute
readonly attribute double clientX;
int32_t niso_mouse_event_get_client_x(niso_dom* dom, niso_handle self, double* out);
attribute
readonly attribute double clientY;
int32_t niso_mouse_event_get_client_y(niso_dom* dom, niso_handle self, double* out);
attribute
readonly attribute boolean ctrlKey;
int32_t niso_mouse_event_get_ctrl_key(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean shiftKey;
int32_t niso_mouse_event_get_shift_key(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean altKey;
int32_t niso_mouse_event_get_alt_key(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean metaKey;
int32_t niso_mouse_event_get_meta_key(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute short button;
int32_t niso_mouse_event_get_button(niso_dom* dom, niso_handle self, int16_t* out);
attribute
readonly attribute unsigned short buttons;
int32_t niso_mouse_event_get_buttons(niso_dom* dom, niso_handle self, uint16_t* out);
attribute
readonly attribute double pageX;
int32_t niso_mouse_event_get_page_x(niso_dom* dom, niso_handle self, double* out);
attribute
readonly attribute double pageY;
int32_t niso_mouse_event_get_page_y(niso_dom* dom, niso_handle self, double* out);
attribute
readonly attribute double x;
int32_t niso_mouse_event_get_x(niso_dom* dom, niso_handle self, double* out);
attribute
readonly attribute double y;
int32_t niso_mouse_event_get_y(niso_dom* dom, niso_handle self, double* out);
attribute
readonly attribute double offsetX;
int32_t niso_mouse_event_get_offset_x(niso_dom* dom, niso_handle self, double* out);
attribute
readonly attribute double offsetY;
int32_t niso_mouse_event_get_offset_y(niso_dom* dom, niso_handle self, double* out);

Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.

  • getModifierState (Mouse events)
  • layerX (Mouse events)
  • layerY (Mouse events)
  • movementX (Mouse events)
  • movementY (Mouse events)
  • relatedTarget (Mouse events)