puppeteer/website/versioned_docs/version-10.1.0/puppeteer.eventemitter.emit.md
2021-08-10 11:09:48 +01:00

716 B

Home > puppeteer > EventEmitter > emit

EventEmitter.emit() method

Emit an event and call any associated listeners.

Signature:

emit(event: EventType, eventData?: unknown): boolean;

Parameters

Parameter Type Description
event EventType the event you'd like to emit
eventData unknown any data you'd like to emit with the event

Returns:

boolean

true if there are any listeners, false if there are not.