Table of Contents

Class MouseEventDispatchExtensions

Namespace
Bunit
Assembly
Bunit.Web.dll

Mouse event dispatch helper extension methods.

public static class MouseEventDispatchExtensions
Inheritance
MouseEventDispatchExtensions
Inherited Members

Methods

Click(IElement, MouseEventArgs)

Raises the @onclick event on element, passing the provided eventArgs to the event handler.

public static void Click(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

Click(IElement, long, double, double, double, double, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @onclick event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void Click(this IElement element, long detail = 1, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, double pageX = 0, double pageY = 0, double offsetX = 0, double offsetY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

pageX double

The X coordinate of the mouse pointer relative to the whole document.

pageY double

The Y coordinate of the mouse pointer relative to the whole document.

offsetX double

The X coordinate of the mouse pointer in relative (Target Element) coordinates.

offsetY double

The Y coordinate of the mouse pointer in relative (Target Element) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

Click(IElement, long, double, double, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @onclick event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void Click(this IElement element, long detail = 1, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, double offsetX = 0, double offsetY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

offsetX double

The X coordinate of the mouse pointer in relative (Target Element) coordinates.

offsetY double

The Y coordinate of the mouse pointer in relative (Target Element) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

Click(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @onclick event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void Click(this IElement element, long detail = 1, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

ClickAsync(IElement, MouseEventArgs)

Raises the @onclick event on element, passing the provided eventArgs to the event handler.

public static Task ClickAsync(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

ContextMenu(IElement, MouseEventArgs)

Raises the @oncontextmenu event on element, passing the provided eventArgs to the event handler.

public static void ContextMenu(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

ContextMenu(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @oncontextmenu event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void ContextMenu(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

ContextMenuAsync(IElement, MouseEventArgs)

Raises the @oncontextmenu event on element, passing the provided eventArgs to the event handler.

public static Task ContextMenuAsync(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

DoubleClick(IElement, MouseEventArgs)

Raises the @ondblclick event on element, passing the provided eventArgs to the event handler.

public static void DoubleClick(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

DoubleClick(IElement, long, double, double, double, double, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @ondblclick event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void DoubleClick(this IElement element, long detail = 2, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, double pageX = 0, double pageY = 0, double offsetX = 0, double offsetY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

pageX double

The X coordinate of the mouse pointer relative to the whole document.

pageY double

The Y coordinate of the mouse pointer relative to the whole document.

offsetX double

The X coordinate of the mouse pointer in relative (Target Element) coordinates.

offsetY double

The Y coordinate of the mouse pointer in relative (Target Element) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

DoubleClick(IElement, long, double, double, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @ondblclick event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void DoubleClick(this IElement element, long detail = 2, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, double offsetX = 0, double offsetY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

offsetX double

The X coordinate of the mouse pointer in relative (Target Element) coordinates.

offsetY double

The Y coordinate of the mouse pointer in relative (Target Element) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

DoubleClick(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @ondblclick event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void DoubleClick(this IElement element, long detail = 2, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

DoubleClickAsync(IElement, MouseEventArgs)

Raises the @ondblclick event on element, passing the provided eventArgs to the event handler.

public static Task DoubleClickAsync(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

MouseDown(IElement, MouseEventArgs)

Raises the @onmousedown event on element, passing the provided eventArgs to the event handler.

public static void MouseDown(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

MouseDown(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @onmousedown event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void MouseDown(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

MouseDownAsync(IElement, MouseEventArgs)

Raises the @onmousedown event on element, passing the provided eventArgs to the event handler.

public static Task MouseDownAsync(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

MouseMove(IElement, MouseEventArgs)

Raises the @onmousemove event on element, passing the provided eventArgs to the event handler.

public static void MouseMove(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

MouseMove(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @onmousemove event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void MouseMove(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

MouseMoveAsync(IElement, MouseEventArgs)

Raises the @onmousemove event on element, passing the provided eventArgs to the event handler.

public static Task MouseMoveAsync(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

MouseOut(IElement, MouseEventArgs)

Raises the @onmouseout event on element, passing the provided eventArgs to the event handler.

public static void MouseOut(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

MouseOut(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @onmouseout event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void MouseOut(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

MouseOutAsync(IElement, MouseEventArgs)

Raises the @onmouseout event on element, passing the provided eventArgs to the event handler.

public static Task MouseOutAsync(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

MouseOver(IElement, MouseEventArgs)

Raises the @onmouseover event on element, passing the provided eventArgs to the event handler.

public static void MouseOver(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

MouseOver(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @onmouseover event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void MouseOver(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

MouseOverAsync(IElement, MouseEventArgs)

Raises the @onmouseover event on element, passing the provided eventArgs to the event handler.

public static Task MouseOverAsync(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

MouseUp(IElement, MouseEventArgs)

Raises the @onmouseup event on element, passing the provided eventArgs to the event handler.

public static void MouseUp(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

MouseUp(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?)

Raises the @onmouseup event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void MouseUp(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

MouseUpAsync(IElement, MouseEventArgs)

Raises the @onmouseup event on element, passing the provided eventArgs to the event handler.

public static Task MouseUpAsync(this IElement element, MouseEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs MouseEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

MouseWheel(IElement, WheelEventArgs)

Raises the @onmousewheel event on element, passing the provided eventArgs to the event handler.

public static void MouseWheel(this IElement element, WheelEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs WheelEventArgs

The event arguments to pass to the event handler.

MouseWheel(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, double, double, double, long)

Raises the @onmousewheel event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void MouseWheel(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, double deltaX = 0, double deltaY = 0, double deltaZ = 0, long deltaMode = 0)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

deltaX double

The horizontal scroll amount.

deltaY double

The vertical scroll amount.

deltaZ double

The scroll amount for the z-axis.

deltaMode long

The unit of the delta values scroll amount.

MouseWheelAsync(IElement, WheelEventArgs)

Raises the @onmousewheel event on element, passing the provided eventArgs to the event handler.

public static Task MouseWheelAsync(this IElement element, WheelEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs WheelEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

Wheel(IElement, WheelEventArgs)

Raises the @onwheel event on element, passing the provided eventArgs to the event handler.

public static void Wheel(this IElement element, WheelEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs WheelEventArgs

The event arguments to pass to the event handler.

Wheel(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, double, double, double, long)

Raises the @onwheel event on element, passing the provided properties to the event handler via a MouseEventArgs object.

public static void Wheel(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, double deltaX = 0, double deltaY = 0, double deltaZ = 0, long deltaMode = 0)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

buttons long

The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

deltaX double

The horizontal scroll amount.

deltaY double

The vertical scroll amount.

deltaZ double

The scroll amount for the z-axis.

deltaMode long

The unit of the delta values scroll amount.

WheelAsync(IElement, WheelEventArgs)

Raises the @onwheel event on element, passing the provided eventArgs to the event handler.

public static Task WheelAsync(this IElement element, WheelEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs WheelEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

Progress Telerik

Premium sponsor: Progress Telerik.

Packt

Editorial support provided by Packt.

.NET Foundation

Supported by the .NET Foundation.