--- title: UIEvent slug: Web/API/UIEvent tags: - API translation_of: Web/API/UIEvent ---
{{APIRef("DOM Events")}}
The UIEvent
interface represents simple user interface events.
UIEvent
derives from {{domxref("Event")}}. Though the {{domxref("UIEvent.initUIEvent()")}} method is kept for backward compatibility, creating of a UIEvent
object should be done using the {{domxref("UIEvent.UIEvent", "UIEvent()")}} constructor.
Several interfaces are direct or indirect descendants of this one: {{domxref("MouseEvent")}}, {{domxref("FocusEvent")}}, {{domxref("KeyboardEvent")}}, {{domxref("WheelEvent")}}, {{domxref("InputEvent")}}, and {{domxref("CompositionEvent")}}.
UIEvent
object.This interface also inherits properties of its parent, {{domxref("Event")}}.
long
that gives some detail about the event, depending on the type of event.keyCode
of the key pressed, or the character code (charCode
) for an alphanumeric key pressed.This interface also inherits methods of its parent, {{domxref("Event")}}.
UIEvent
object. If the event has already being dispatched, this method does nothing.Specification | Status | Comment |
---|---|---|
{{SpecName('DOM3 Events', '#interface-UIEvent', 'UIEvent')}} | {{Spec2('DOM3 Events')}} | From {{SpecName('DOM2 Events')}}:
|
{{SpecName('DOM2 Events', '#Events-UIEvent', 'UIEvent')}} | {{Spec2('DOM2 Events')}} | Initial definition. |
{{ CompatibilityTable() }}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{ CompatVersionUnknown() }} | {{ CompatVersionUnknown() }} | {{ CompatUnknown() }} | {{ CompatVersionUnknown() }} | {{ CompatUnknown() }} |
UIEvent() |
{{ CompatVersionUnknown() }} | {{ CompatGeckoDesktop(11)}} | {{ CompatUnknown() }} | {{ CompatVersionUnknown() }} | {{ CompatUnknown() }} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{ CompatVersionUnknown() }} | {{ CompatVersionUnknown() }} | {{ CompatUnknown() }} | {{ CompatVersionUnknown() }} | {{ CompatUnknown() }} |
UIEvent() |
{{ CompatVersionUnknown() }} | {{ CompatGeckoMobile(11)}} | {{ CompatUnknown() }} | {{ CompatVersionUnknown() }} | {{ CompatUnknown() }} |