Name

UIEvent: details about user-interface events — DOM Level 2 Events: Event → UIEvent

Subinterfaces

KeyEvent, MouseEvent

Properties

readonly long detail

A numeric detail about the event. For click, mousedown, and mouseup events (see MouseEvent), this field is the click count: 1 for a single-click, 2 for a double-click, 3 for a triple-click, and so on. For DOMActivate events, this field is 1 for a normal activation or 2 for a “hyperactivation,” such as a double-click or Shift-Enter combination.

readonly Window view

The window (the “view”) in which the event was generated.

Methods

initUIEvent( )

Initializes the properties of a newly created UIEvent object, including the properties inherited from the Event interface.

Description

The UIEvent interface is a subinterface of Event and defines the type of Event object passed to events of type DOMFocusIn, DOMFocusOut, and DOMActivate. These event types are not commonly used in web browsers, and what is more important about the UIEvent interface is that it is the parent interface of MouseEvent.

See Also

Event, KeyEvent, MouseEvent; Chapter 17

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.