UIEvent

Cette traduction est incomplète. Aidez à traduire cet article depuis l'anglais.

The UIEvent interface represents simple user interface events.

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

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

Constructors

UIEvent()
Creates a UIEvent object.

Properties

This interface also inherits properties of its parent, Event.

UIEvent.cancelBubble
Is a Boolean indicating whether the bubbling of the event has been canceled or not.
UIEvent.detailLecture seule
Returns a long that gives some detail about the event, depending on the type of event.
UIEvent.isChar Lecture seule
Returns a Boolean indicating whether the event produced a key character or not.
UIEvent.layerX Lecture seule
Returns the horizontal coordinate of the event relative to the current layer.
UIEvent.layerY Lecture seule
Returns the vertical coordinate of the event relative to the current layer.
UIEvent.pageX Lecture seule
Returns the horizontal coordinate of the event relative to the whole document.
UIEvent.pageY Lecture seule
Returns the vertical coordinate of the event relative to the whole document.
UIEvent.viewLecture seule
Returns a WindowProxy that contains the view that generated the event.
UIEvent.which Lecture seule
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()
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 définition de 'UIEvent' dans cette spécification.
Working Draft 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 définition de 'UIEvent' dans cette spécification.
Recommendation Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Oui) (Oui) ? (Oui) ?
UIEvent() (Oui) 11 (11) ? (Oui) ?
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Oui) (Oui) ? (Oui) ?
UIEvent() (Oui) 11.0 (11) ? (Oui) ?

See also

Étiquettes et contributeurs liés au document

Étiquettes : 
 Contributeurs à cette page : fscholz
 Dernière mise à jour par : fscholz,