This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The InputEvent interface represents an event notifying of editable content change.
InputEvent()InputEvent object.This interface inherits properties from its parents, UIEvent and Event.
InputEvent.dataRead only
DOMString with the inserted characters. This may be an empty string if the change doesn't insert text (such as when deleting characters, for example).InputEvent.dataTransferRead only
DataTransfer object containing information about richtext or plaintext data being added to or removed from editable content.InputEvent.inputTypeRead only
InputEvent.isComposingRead only
Boolean value indicating if the event is fired after compositionstart and before compositionend.This interface inherits methods from its parents, UIEvent and Event.
InputEvent.getTargetRanges()| Specification | Status | Comment |
|---|---|---|
| Input Events Level 2 The definition of 'InputEvent' in that specification. | Working Draft | Initial definition. |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | 60 | ? | 31 | No | 47 | 10.1 |
InputEvent() constructor
|
60 | ? | 31 | No | 47 | ? |
data
|
60 | ? | No | No | 47 | No |
dataTransfer
|
60 | ? | No | No | 47 | No |
getTargetRanges
|
60 | No | No | No | 47 | 10.1 |
inputType
|
60 | ? | No | No | 47 | 10.1 |
isComposing
|
60 | ? | 31 | No | 47 | No |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | 60 | 60 | ? | 31 | 47 | 10.1 | ? |
InputEvent() constructor
|
60 | 60 | ? | 31 | 47 | ? | ? |
data
|
60 | 60 | ? | No | 47 | No | ? |
dataTransfer
|
60 | 60 | ? | No | 47 | No | ? |
getTargetRanges
|
60 | 60 | No | No | 47 | 10.1 | ? |
inputType
|
60 | 60 | ? | No | 47 | 10.1 | ? |
isComposing
|
60 | 60 | ? | 31 | 47 | No | ? |
© 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/InputEvent