BrowserEvent 枚举
🌐 BrowserEvent enum
所有 浏览器实例 可能触发的事件。
🌐 All the events a browser instance may emit.
语法
🌐 Signature
export declare const enum BrowserEvent
枚举成员
🌐 Enumeration Members
成员 🌐 Member | 值 🌐 Value | 描述 🌐 Description |
|---|---|---|
已断开连接 🌐 Disconnected |
| 当 Puppeteer 与浏览器实例断开连接时触发。这可能是因为以下原因之一: 🌐 Emitted when Puppeteer gets disconnected from the browser instance. This might happen because either:
|
TargetChanged |
| 当目标的 URL 发生变化时发出。包含一个 Target 实例。 🌐 Emitted when the URL of a target changes. Contains a Target instance. 附注 请注意,这包括所有浏览器上下文中的目标更改。 🌐 Note that this includes target changes in all browser contexts. |
TargetCreated |
| 当创建目标时触发,例如当通过 window.open 或 browser.newPage 打开新页面时 🌐 Emitted when a target is created, for example when a new page is opened by window.open or by browser.newPage 包含一个 Target 实例。 🌐 Contains a Target instance. 附注 请注意,这包括所有浏览器上下文中的目标创建。 🌐 Note that this includes target creations in all browser contexts. |
TargetDestroyed |
| 当目标被销毁时触发,例如当页面关闭时。包含一个 Target 实例。 🌐 Emitted when a target is destroyed, for example when a page is closed. Contains a Target instance. 附注 请注意,这包括所有浏览器上下文中的目标破坏。 🌐 Note that this includes target destructions in all browser contexts. |