web api interface
InputEvent
The InputEvent interface represents an event notifying the user of editable content changes.
Constructor
InputEvent()- : Creates an
InputEventobject.
- : Creates an
Instance properties
This interface inherits properties from its parents, UIEvent and Event.
dataRead only- : 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).
dataTransferRead only- : Returns a
DataTransferobject containing information about richtext or plaintext data being added to or removed from editable content.
- : Returns a
inputTypeRead only- : Returns the type of change for editable content such as, for example, inserting, deleting, or formatting text.
isComposingRead only- : Returns a
Booleanvalue indicating if the event is fired aftercompositionstartand beforecompositionend.
- : Returns a
Instance methods
This interface inherits methods from its parents, UIEvent and Event.
getTargetRanges()- : Returns an array of
StaticRangeobjects that will be affected by a change to the DOM if the input event is not canceled.
- : Returns an array of
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.