GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

InputEvent

UI Events

UI Events

The **`InputEvent`** interface represents an event notifying the user of editable content changes.

## Constructor

- InputEvent()
- : Creates an `InputEvent` object.

## Instance properties

_This interface inherits properties from its parents, UIEvent and Event._

- InputEvent.data
- : Returns a string with the inserted characters. This may be an empty string if the change doesn't insert text (for example, when deleting characters).
- InputEvent.dataTransfer
- : Returns a DataTransfer object containing information about richtext or plaintext data being added to or removed from editable content.
- InputEvent.inputType
- : Returns the type of change for editable content such as, for example, inserting, deleting, or formatting text.
- InputEvent.isComposing
- : Returns a Boolean value indicating if the event is fired after compositionstart and before compositionend.

## Instance methods

_This interface inherits methods from its parents, UIEvent and Event._

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

## Specifications

## Browser compatibility

## See also

- [`beforeinput` event](/docs/Web/API/Element/beforeinput_event)
- [`input` event](/docs/Web/API/Element/input_event)

source: MDN Web Docs mirror · page

Cite this

"InputEvent". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/InputEvent

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·