InputEvent

open class InputEvent(val type: EventType<InputEvent>, init: InputEventInit = definedExternally) : UIEvent(source)

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

MDN Reference

Constructors

Link copied to clipboard
constructor(type: EventType<InputEvent>, init: InputEventInit = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
external val bubbles: Boolean
Link copied to clipboard
external val cancelable: Boolean
Link copied to clipboard
external val composed: Boolean
Link copied to clipboard
external val currentTarget: EventTarget?
Link copied to clipboard
external val data: String?

The data read-only property of the InputEvent interface returns a string with inserted characters. This may be an empty string if the change doesn't insert text, such as when characters are deleted.

Link copied to clipboard
external val dataTransfer: DataTransfer?

The dataTransfer read-only property of the InputEvent interface returns a DataTransfer object containing information about richtext or plaintext data being added to or removed from editable content.

Link copied to clipboard
Link copied to clipboard
external val detail: Int

The UIEvent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click count.

Link copied to clipboard
external val eventPhase: EventPhase
Link copied to clipboard
external val inputType: String

The inputType read-only property of the InputEvent interface returns the type of change made to editable content. Possible changes include for example inserting, deleting, and formatting text.

Link copied to clipboard
external val isComposing: Boolean

The InputEvent.isComposing read-only property returns a boolean value indicating if the event is fired after compositionstart and before compositionend.

Link copied to clipboard
external val isTrusted: Boolean
Link copied to clipboard
external val target: EventTarget?
Link copied to clipboard
Link copied to clipboard
open external override val type: EventType<InputEvent>
Link copied to clipboard
external val view: Window?

The UIEvent.view read-only property returns the WindowProxy object from which the event was generated. In browsers, this is the Window object the event happened in.

Functions

Link copied to clipboard
Link copied to clipboard

The getTargetRanges() method of the InputEvent interface returns an array of StaticRange objects that will be affected by a change to the DOM if the input event is not canceled.

Link copied to clipboard
external fun preventDefault()
Link copied to clipboard
Link copied to clipboard
external fun stopPropagation()