Skip to main content
Version: 22.3.0

PageEvent enum

All the events that a page instance may emit.


export declare const enum PageEvent

Enumeration Members

Close"close"Emitted when the page closes.
Console"console"Emitted when JavaScript within the page calls one of console API methods, e.g. console.log or console.dir. Also emitted if the page throws an error or a warning.
Dialog"dialog"Emitted when a JavaScript dialog appears, such as alert, prompt, confirm or beforeunload. Puppeteer can respond to the dialog via Dialog.accept() or Dialog.dismiss().
DOMContentLoaded"domcontentloaded"Emitted when the JavaScript DOMContentLoaded event is dispatched.
Error"error"Emitted when the page crashes. Will contain an Error.
FrameAttached"frameattached"Emitted when a frame is attached. Will contain a Frame.
FrameDetached"framedetached"Emitted when a frame is detached. Will contain a Frame.
FrameNavigated"framenavigated"Emitted when a frame is navigated to a new URL. Will contain a Frame.
Load"load"Emitted when the JavaScript load event is dispatched.
Metrics"metrics"Emitted when the JavaScript code makes a call to console.timeStamp. For the list of metrics see page.metrics.
PageError"pageerror"Emitted when an uncaught exception happens within the page. Contains an Error.

Emitted when the page opens a new tab or window.

Contains a Page corresponding to the popup window.

Request"request"Emitted when a page issues a request and contains a HTTPRequest.

Emitted when a request fails, for example by timing out.

Contains a HTTPRequest.

RequestFinished"requestfinished"Emitted when a request finishes successfully. Contains a HTTPRequest.
RequestServedFromCache"requestservedfromcache"Emitted when a request ended up loading from cache. Contains a HTTPRequest.
Response"response"Emitted when a response is received. Contains a HTTPResponse.
WorkerCreated"workercreated"Emitted when a dedicated WebWorker is spawned by the page.
WorkerDestroyed"workerdestroyed"Emitted when a dedicated WebWorker is destroyed by the page.