puppeteer/website/versioned_docs/version-10.1.0/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