Table of Contents

Interface IJsEvent

Namespace
MudBlazor.Services
Assembly
MudBlazor.dll

Provides functionality to subscribe to JavaScript events of any HTML element by its ID.

public interface IJsEvent : IAsyncDisposable
Inherited Members
Extension Methods

Methods

Connect(string, JsEventOptions)

Connects to the ancestor element of the element(s) that should be observed.

Task Connect(string elementId, JsEventOptions options)

Parameters

elementId string

The ID of the ancestor HTML element.

options JsEventOptions

The options defining the descendants to be observed and the keystrokes to be monitored.

Returns

Task

A Task representing the asynchronous operation.

Disconnect()

Disconnects from the previously connected ancestor and its descendants.

Task Disconnect()

Returns

Task

A Task representing the asynchronous operation.

Events

CaretPositionChanged

Occurs when the caret position changes in an input element, either on click or keyup.

event Action<int> CaretPositionChanged

Event Type

Action<int>

Paste

Occurs when a paste action is performed.

event Action<string> Paste

Event Type

Action<string>

Select

Occurs when a text selection action is performed.

event Action<int, int> Select

Event Type

Action<int, int>