The UIEvent()
constructor creates a new UIEvent
.
event = new UIEvent(typeArg, UIEventInit)
DOMString
representing the name of the event.UIEventInit
dictionary, having the following fields: detail
: optional and defaulting to 0
, of type long
, that is a event-dependant value associated with the event. UIEvent.detail
lists the semantic for standard events.view:
optional and defaulting to null
, of type WindowProxy
, that is the Window
associated with the event .sourceCapabilities
: An instance of the InputDeviceCapabilities
interface which provides information about the physical device responsible for generating a touch event.The UIEventInit
dictionary also accepts fields from the EventInit
dictionary.
Specification | Status | Comment |
---|---|---|
InputDeviceCapabilities | Draft | Added sourceCapabilities property. |
Document Object Model (DOM) Level 3 Events Specification The definition of 'UIEvent()' in that specification. | Obsolete | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | Yes | 11 | ? | Yes | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | Yes | 14 | Yes | ? | ? |
UIEvent
, the interface of the objects it constructs.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/UIEvent