PageEvents 接口
表示页面事件回调函数接收到的对象。
有关事件及其触发时间的详细信息,请参阅 PageEvent。
签名:
export interface PageEvents extends Record<EventType, unknown>
扩展: Record<EventType, unknown>
属性
属性 | 修饰符 | 类型 | 描述 | 默认值 |
---|---|---|---|---|
close | undefined | |||
console | 控制台消息 | |||
dialog | 对话框 | |||
domcontentloaded | undefined | |||
error | Error | |||
frameattached | 框架 | |||
framedetached | 框架 | |||
framenavigated | 框架 | |||
load | undefined | |||
metrics | { title: string; metrics: Metrics; } | |||
pageerror | Error | |||
popup | Page | null | |||
request | HTTP 请求 | |||
requestfailed | HTTP 请求 | |||
requestfinished | HTTP 请求 | |||
requestservedfromcache | HTTP 请求 | |||
response | HTTP 响应 | |||
workercreated | WebWorker | |||
workerdestroyed | WebWorker |