Events passed to handler callbacks are similar to jQuery event objects in that they wrap native event objects, mimicking their API.

http://js.cytoscape.org/#events

interface EventObject {
    cy: cytoscape.Core;
    isDefaultPrevented: (() => boolean);
    isImmediatePropagationStopped: (() => boolean);
    isPropagationStopped: (() => boolean);
    layout: any;
    namespace: string;
    originalEvent: MouseEvent;
    position: Position;
    preventDefault: (() => void);
    renderedPosition: Position;
    stopImmediatePropagation: (() => void);
    stopPropagation: (() => void);
    target: any;
    timeStamp: number;
    type: UserInputDeviceEventName | UserInputDeviceEventNameExt;
}

Hierarchy (view full)

Properties

a reference to the corresponding core Core

isDefaultPrevented: (() => boolean)
isImmediatePropagationStopped: (() => boolean)
isPropagationStopped: (() => boolean)
layout: any

layout : indicates the corresponding layout that triggered the event (useful if running multiple layouts simultaneously)

namespace: string

the event namespace string (e.g. "foo" for "foo.tap")

originalEvent: MouseEvent

originalEvent : the original user input device event object

position: Position

position : indicates the model position of the event

preventDefault: (() => void)
renderedPosition: Position

renderedPosition : indicates the rendered position of the event

stopImmediatePropagation: (() => void)
stopPropagation: (() => void)
target: any

indicates the element or core that first caused the event

timeStamp: number

Unix epoch time of event in milliseconds

the event type string (e.g. "tap")