UIEvent
The UIEvent interface represents simple user interface events.
UIEvent derives from Event. Although the UIEvent.initUIEvent() method is kept for backward compatibility, you should create a UIEvent object using the UIEvent() constructor.
Several interfaces are direct or indirect descendants of this one: MouseEvent, TouchEvent, FocusEvent, KeyboardEvent, WheelEvent, InputEvent, and CompositionEvent.
Constructors
UIEvent()-
Creates a
UIEventobject.
Instance properties
This interface also inherits properties of its parent, Event.
UIEvent.detailRead only-
Returns a
longwith details about the event, depending on the event type. UIEvent.sourceCapabilitiesExperimental Read only-
Returns an instance of the
InputDeviceCapabilitiesinterface, which provides information about the physical device responsible for generating a touch event. UIEvent.viewRead only-
Returns a WindowProxy that contains the view that generated the event.
UIEvent.whichDeprecated Read only-
Returns the numeric
keyCodeof the key pressed, or the character code (charCode) for an alphanumeric key pressed.
Instance methods
This interface also inherits methods of its parent, Event.
UIEvent.initUIEvent()Deprecated-
Initializes a
UIEventobject. If the event has already been dispatched, this method does nothing.
Specifications
| Specification |
|---|
| UI Events # idl-uievent |
Browser compatibility
BCD tables only load in the browser