The InputEvent() constructor creates a new InputEvent.
Syntax
event = new InputEvent(typeArg, inputEventInit);
Values
- typeArg
- Is a
DOMStringrepresenting the name of the event. - inputEventInitOptional
- Is a
InputEventInitdictionary, having the following fields:"isComposing", optional and defaulting tofalse, of typeBoolean, that is the if the event is part of a composition session, after thecompositionstartevent and beforecompositionend.
The
InputEventInitdictionary also accepts fields fromUIEventInitand fromEventInitdictionaries.
Specifications
| Specification | Status | Comment |
|---|---|---|
| Document Object Model (DOM) Level 3 Events Specification The definition of 'InputEvent()' in that specification. |
Working Draft | Initial definition. |
Browser compatibility
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | (Yes) | 31 (31) | ? | (Yes) | ? |
| Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | ? | ? | 31.0 (31) | ? | ? | ? |
See also
InputEvent, the interface of the objects it constructs.