跳到主要内容
版本: 23.11.1

PageEvents 接口

表示页面事件的回调函数接收到的对象。

有关事件及其触发时间的更多详细信息,请参阅 PageEvent

签名

export interface PageEvents extends Record<EventType, unknown>

继承自: Record<EventType, unknown>

属性

属性

修饰符

类型

描述

默认值

close

undefined

console

ConsoleMessage

dialog

Dialog

domcontentloaded

undefined

error

Error

frameattached

Frame

framedetached

Frame

framenavigated

Frame

load

undefined

metrics

{ title: string; metrics: Metrics; }

pageerror

Error

popup

Page | null

request

HTTPRequest

requestfailed

HTTPRequest

requestfinished

HTTPRequest

requestservedfromcache

HTTPRequest

response

HTTPResponse

workercreated

WebWorker

workerdestroyed

WebWorker