@serenity-is/corelib / Fluent / trigger

Function: trigger()

trigger(element, type, args?): Event & object

Defined in: src/base/fluent.ts:485

Triggers a specified event on the element.

Parameters

element

EventTarget

The target element

type

string

The type of the event to trigger.

args?

any

Optional. An object that specifies event-specific initialization properties.

Returns

Event & object

The event object. Use Fluent.isDefaultPrevented the check if preventDefault is called.