The UIEvent()
constructor creates a new UIEvent
.
Syntax
event = new UIEvent(typeArg [, UIEventInit])
Values
typeArg
Is a DOMString
representing the name of the event.
UIEventInit
Optional
Is a UIEventInit
dictionary, having the following fields:
detail
: optional and defaulting to0
, of typelong
, that is a event-dependant value associated with the event.UIEvent.detail
lists the semantic for standard events.view
: optional and defaulting tonull
, of typeWindowProxy
, that is theWindow
associated with the event .sourceCapabilities
: ' An instance of theInputDeviceCapabilities
interface which provides information about the physical device responsible for generating a touch event.
The UIEventInit
dictionary also accepts fields from the EventInit
dictionary.
Specifications
Specification | Status | Comment |
---|---|---|
InputDeviceCapabilities | Draft | Added sourceCapabilities property.
|
Document Object Model (DOM) Level 3 Events SpecificationThe definition of 'UIEvent()' in that specification. | Obsolete | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
UIEvent() constructor
|
Chrome
Full support Yes |
Edge
Full support ≤18 |
Firefox
Full support 11 |
IE
? |
Opera
Full support Yes |
Safari
? |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 14 |
Opera Android
Full support Yes |
Safari iOS
? |
Samsung Internet Android
Full support Yes |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
See also
UIEvent
, the interface of the objects it constructs.
UIEvent() by Mozilla Contributors is licensed under CC-BY-SA 2.5.