files/en-us/web/api/textevent/inittextevent/index.md
{{APIRef("UI Events")}}{{deprecated_header}}
The initTextEventEvent() method of the {{domxref("TextEvent")}} interface initializes the value of a TextEvent after it has been created.
This method must be called to set the event before it is dispatched, using {{ domxref("EventTarget.dispatchEvent()") }}.
[!NOTE] In general, you won't create these events yourself; they are created by the browser.
initTextEvent(type)
initTextEvent(type, bubbles)
initTextEvent(type, bubbles, cancelable)
initTextEvent(type, bubbles, cancelable, view)
initTextEvent(type, bubbles, cancelable, view, data)
type
textInput.bubbles {{optional_inline}}
false by default. Sets the value of {{domxref("Event.bubbles")}}.cancelable {{optional_inline}}
false by default. Sets the value of {{domxref("Event.cancelable")}}.view {{optional_inline}}
null by default.data {{optional_inline}}
None ({{jsxref("undefined")}}).
{{Specifications}}
{{Compat}}