我们的志愿者还没有将这篇文章翻译为 中文 (简体)。加入我们帮助完成翻译!
您也可以阅读此文章的English (US)版。
The UIEvent() constructor creates a new UIEvent.
Syntax
event = new UIEvent(typeArg, UIEventInit)
Values
- typeArg
- Is a
DOMStringrepresenting the name of the event. - UIEventInitOptional
- Is a
UIEventInitdictionary, having the following fields:detail: optional and defaulting to0, of typelong, that is a event-dependant value associated with the event.UIEvent.detaillists the semantic for standard events.view:optional and defaulting tonull, of typeWindowProxy, that is theWindowassociated with the event .sourceCapabilities: An instance of theInputDeviceCapabilitiesinterface which provides information about the physical device responsible for generating a touch event.
The
UIEventInitdictionary also accepts fields from theEventInitdictionary.
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 | Initial definition. |
Browser compatibility
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | (Yes) | 11 (11) | ? | (Yes) | ? |
| Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | ? | ? | 11.0 (11) | ? | ? | ? |
See also
UIEvent, the interface of the objects it constructs.