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.


Creates an InputEvent object.


This interface inherits properties from its parents, UIEvent and Event.

InputEvent.dataRead only
Returns a 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
Returns a DataTransfer object containing information about richtext or plaintext data being added to or removed from editable content.
InputEvent.inputTypeRead only
Returns the type of change for editable content such as, for example, inserting, deleting, or formatting text.  See the property page for a complete list of input types.  
InputEvent.isComposingRead only
Returns a Boolean value indicating if the event is fired after compositionstart and before compositionend.


This interface inherits methods from its parents, UIEvent and Event.

Returns an array of static ranges that will be affected by a change to the DOM if the input event is not canceled. 


Specification Status Comment
Input Events Level 2
The definition of 'InputEvent' in that specification.
Working Draft Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support60 ?31 No4710.1
InputEvent() constructor60 ?31 No47 ?
data60 ? No No47 No
dataTransfer60 ? No No47 No
getTargetRanges60 No No No4710.1
inputType60 ? No No4710.1
isComposing60 ?31 No47 No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support6060 ?314710.1 ?
InputEvent() constructor6060 ?3147 ? ?
data6060 ? No47 No ?
dataTransfer6060 ? No47 No ?
getTargetRanges6060 No No4710.1 ?
inputType6060 ? No4710.1 ?
isComposing6060 ?3147 No ?

See also

Document Tags and Contributors

Contributors to this page: fscholz, WORMSS, suterj, sjmog, ctbeiser, jpmedley, ziyunfei, teoli, Masayuki
Last updated by: fscholz,