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.

Constructor

InputEvent()
Creates an InputEvent object.

Properties

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.

Methods

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

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

Specifications

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

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
Experimental
Chrome Full support 60Edge ? Firefox Full support 31IE No support NoOpera Full support 47Safari Full support 10.1WebView Android Full support 60Chrome Android Full support 60Edge Mobile ? Firefox Android Full support 31Opera Android Full support 47Safari iOS Full support 10.1Samsung Internet Android ?
InputEvent() constructor
Experimental
Chrome Full support 60Edge ? Firefox Full support 31IE No support NoOpera Full support 47Safari ? WebView Android Full support 60Chrome Android Full support 60Edge Mobile ? Firefox Android Full support 31Opera Android Full support 47Safari iOS ? Samsung Internet Android ?
data
Experimental
Chrome Full support 60Edge ? Firefox No support NoIE No support NoOpera Full support 47Safari No support NoWebView Android Full support 60Chrome Android Full support 60Edge Mobile ? Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android ?
dataTransfer
Experimental
Chrome Full support 60Edge ? Firefox No support NoIE No support NoOpera Full support 47Safari No support NoWebView Android Full support 60Chrome Android Full support 60Edge Mobile ? Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android ?
getTargetRanges
Experimental
Chrome Full support 60Edge No support NoFirefox No support NoIE No support NoOpera Full support 47Safari Full support 10.1WebView Android Full support 60Chrome Android Full support 60Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 47Safari iOS Full support 10.1Samsung Internet Android ?
inputType
Experimental
Chrome Full support 60Edge ? Firefox No support NoIE No support NoOpera Full support 47Safari Full support 10.1WebView Android Full support 60Chrome Android Full support 60Edge Mobile ? Firefox Android No support NoOpera Android Full support 47Safari iOS Full support 10.1Samsung Internet Android ?
isComposing
Experimental
Chrome Full support 60Edge ? Firefox Full support 31IE No support NoOpera Full support 47Safari No support NoWebView Android Full support 60Chrome Android Full support 60Edge Mobile ? Firefox Android Full support 31Opera Android Full support 47Safari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

See also

Document Tags and Contributors

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