InputEvent Class

https://w3c.github.io/uievents/#inputevent

public sealed class InputEvent : UIEvent
Inheritance
UIEvent InputEvent

Constructors

NameDescription
InputEvent(string, InputEventInit?)Creates an input event of the given type with the given initialization dictionary.

InputEvent(string, InputEventInit?)

UIEvents.cs

Creates an input event of the given type with the given initialization dictionary.

public InputEvent(string type, InputEventInit? eventInitDict = null)

Properties

NameDescription
DataGets the inserted characters, or null when the input does not insert text.
DataTransferGets the data of a paste or of a drop in editable content (the rich text and the plain text), or null: the plain text inserted in a text control is in InputEvent.Data (https://w3c.github.io/input-events/#dom-inputevent-datatransfer).
InputTypeGets the type of the change, such as insertText or deleteContentBackward.
IsComposingGets a value indicating whether the event is part of a composition session.

Gets the inserted characters, or null when the input does not insert text.

public string? Data { get; }

DataTransfer

UIEvents.cs

Gets the data of a paste or of a drop in editable content (the rich text and the plain text), or null: the plain text inserted in a text control is in InputEvent.Data (https://w3c.github.io/input-events/#dom-inputevent-datatransfer).

public DataTransfer? DataTransfer { get; }

InputType

UIEvents.cs

Gets the type of the change, such as insertText or deleteContentBackward.

public string InputType { get; }

IsComposing

UIEvents.cs

Gets a value indicating whether the event is part of a composition session.

public bool IsComposing { get; }

Methods

NameDescription
GetTargetRanges()Returns the ranges that the editing operation affects.

GetTargetRanges()

UIEvents.cs

Returns the ranges that the editing operation affects.

public IReadOnlyList<StaticRange> GetTargetRanges()