Skip to main content

Home > @jsplumb/test > EventHandlers

EventHandlers interface#

Defines a set of event handlers that can be supplied to various methods that simulate mouse activity. Using these you can inject tests into various parts of the lifecycle of a given operation.


export interface EventHandlers<T = any> 


after?(payload?: T) => any(Optional) Called after the activity has been completed.
before?() => any(Optional) Called before any activity occurs.
beforeMouseMove?() => any(Optional) Called after a mousedown event has been posted but before the mouse has moved.
beforeMouseUp?() => any(Optional) Called after the mouse has moved but before the mouseup event has been posted.