Back to Content

TextEvent: data property

files/en-us/web/api/textevent/data/index.md

latest371 B
Original Source

{{APIRef("UI Events")}}{{deprecated_header}}

The data read-only property of the {{domxref("TextEvent")}} interface returns the last character added to the input element.

Value

A string representing the event data. For textInput events, this is the character that was last entered.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}