The InputEvent() constructor creates a new InputEvent object.
new InputEvent(type)
new InputEvent(type, options)typeA string with the name of the event. It is case-sensitive and browsers set it to beforeinput, or input.
options OptionalAn object that, in addition of the properties defined in UIEvent(), can have the following properties:
inputType OptionalA string specifying the type of change for editable content such as, for example, inserting, deleting, or formatting text.
data OptionalA string containing characters to insert. This may be an empty string if the change doesn't insert text (such as when deleting characters, for example).
isComposing OptionalA boolean indicating that the event is part of a composition session, meaning it is after a compositionstart event but before a compositionend event. The default is false.
A new InputEvent object.
InputEvent, the interface of the objects it constructs.