puppeteer/website/versioned_docs/version-9.1.1/puppeteer.page.on.md
2021-08-10 11:09:48 +01:00

646 B

Home > puppeteer > Page > on

Page.on() method

Listen to page events.

Signature:

on<K extends keyof PageEventObject>(eventName: K, handler: (event: PageEventObject[K]) => void): EventEmitter;

Parameters

Parameter Type Description
eventName K
handler (event: PageEventObject[K]) => void

Returns:

EventEmitter