UIEvent

The UIEvent interface represents simple user interface events.

UIEvent derives from Event. Though the UIEvent.initUIEvent() (en-US) method is kept for backward compatibility, creating of a UIEvent object should be done using the UIEvent() (en-US) constructor.

Several interfaces are direct or indirect descendants of this one: MouseEvent, FocusEvent (en-US), KeyboardEvent, WheelEvent, InputEvent (en-US), and CompositionEvent (en-US).

Constructors

UIEvent() (en-US)
Creates a UIEvent object.

Properties

This interface also inherits properties of its parent, Event.

UIEvent.cancelBubble (en-US) Deprecated Non-Standard
Is a Boolean indicating whether the bubbling of the event has been canceled or not.
UIEvent.detail (en-US)Read only
Returns a long that gives some detail about the event, depending on the type of event.
UIEvent.isChar Non-Standard Read only
Returns a Boolean indicating whether the event produced a key character or not.
UIEvent.layerX (en-US) Non-Standard Read only
Returns the horizontal coordinate of the event relative to the current layer.
UIEvent.layerY (en-US) Non-Standard Read only
Returns the vertical coordinate of the event relative to the current layer.
UIEvent.pageX Non-Standard Read only
Returns the horizontal coordinate of the event relative to the whole document.
UIEvent.pageY (en-US) Non-Standard Read only
Returns the vertical coordinate of the event relative to the whole document.
UIEvent.view (en-US)Read only
Returns a WindowProxy that contains the view that generated the event.
UIEvent.which Non-Standard Read only
Returns the numeric keyCode of the key pressed, or the character code (charCode) for an alphanumeric key pressed.

Methods

This interface also inherits methods of its parent, Event.

UIEvent.initUIEvent() (en-US) Deprecated
Initializes a UIEvent object. If the event has already being dispatched, this method does nothing.

Specifications

Specification Status Comment
Document Object Model (DOM) Level 3 Events Specification
La definición de 'UIEvent' en esta especificación.
Obsolete From Document Object Model (DOM) Level 2 Events Specification:
  • added the UIEvent() constructor,
  • deprecated the initUIEvent() method,
  • and changed the type of view from AbstractView to WindowProxy.
Document Object Model (DOM) Level 2 Events Specification
La definición de 'UIEvent' en esta especificación.
Obsolete Initial definition.

Browser compatibility

BCD tables only load in the browser

See also