이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!
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
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.detail
Read only- Returns a
long
with details about the event, depending on the event type. UIEvent.isChar
Read only- Returns a
Boolean
indicating whether the event produced a key character or not. UIEvent.layerX
Read only- Returns the horizontal coordinate of the event relative to the current layer.
UIEvent.layerY
Read only- Returns the vertical coordinate of the event relative to the current layer.
UIEvent.pageX
Read only- Returns the horizontal coordinate of the event relative to the whole document.
UIEvent.pageY
Read only- Returns the vertical coordinate of the event relative to the whole document.
UIEvent.sourceCapabilities
Read only- Returns an instance of the InputDeviceCapabilities interface which provides information about the physical device responsible for generating a touch event.
UIEvent.view
Read only- Returns a
WindowProxy
that contains the view that generated the event. UIEvent.which
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()
- Initializes a
UIEvent
object. If the event has already being dispatched, this method does nothing.
Specifications
Specification | Status | Comment |
---|---|---|
InputDeviceCapabilities | Editor's Draft | Added sourceCapabilities property. |
Document Object Model (DOM) Level 3 Events Specification The definition of 'UIEvent' in that specification. |
Working Draft | 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 The definition of 'UIEvent' in that specification. |
Recommendation | Initial definition |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | ? | (Yes) | ? |
UIEvent() |
(Yes) | 11 (11) | ? | (Yes) | ? |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | ? | (Yes) | ? |
UIEvent() |
(Yes) | 11.0 (11) | ? | (Yes) | ? |
See also
문서 태그 및 공헌자
태그:
이 페이지의 공헌자:
Sebastianz,
jpmedley,
douglas-j-bothwell,
A.Perez,
fscholz,
teoli,
kscarfone,
Sheppy,
KYSergey,
ziyunfei,
Masayuki
최종 변경:
Sebastianz,