mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
afb9355b15
This patch introduces basic Request and Response events for page. It also teaches navigation methods, e.g. `page.goto` to return navigation response.
49 lines
1.3 KiB
JavaScript
49 lines
1.3 KiB
JavaScript
const Events = {
|
|
Page: {
|
|
Close: 'close',
|
|
Console: 'console',
|
|
Dialog: 'dialog',
|
|
DOMContentLoaded: 'domcontentloaded',
|
|
FrameAttached: 'frameattached',
|
|
FrameDetached: 'framedetached',
|
|
FrameNavigated: 'framenavigated',
|
|
Load: 'load',
|
|
PageError: 'pageerror',
|
|
Popup: 'popup',
|
|
Request: 'request',
|
|
Response: 'response',
|
|
RequestFinished: 'requestfinished',
|
|
RequestFailed: 'requestfailed',
|
|
},
|
|
Browser: {
|
|
TargetCreated: 'targetcreated',
|
|
TargetChanged: 'targetchanged',
|
|
TargetDestroyed: 'targetdestroyed',
|
|
},
|
|
BrowserContext: {
|
|
TargetCreated: 'targetcreated',
|
|
TargetChanged: 'targetchanged',
|
|
TargetDestroyed: 'targetdestroyed',
|
|
},
|
|
|
|
Connection: {
|
|
Disconnected: Symbol('Events.Connection.Disconnected'),
|
|
},
|
|
|
|
FrameManager: {
|
|
Load: Symbol('Events.FrameManager.Load'),
|
|
DOMContentLoaded: Symbol('Events.FrameManager.DOMContentLoaded'),
|
|
FrameAttached: Symbol('Events.FrameManager.FrameAttached'),
|
|
FrameNavigated: Symbol('Events.FrameManager.FrameNavigated'),
|
|
FrameDetached: Symbol('Events.FrameManager.FrameDetached'),
|
|
},
|
|
|
|
NetworkManager: {
|
|
Request: Symbol('Events.NetworkManager.Request'),
|
|
Response: Symbol('Events.NetworkManager.Response'),
|
|
RequestFinished: Symbol('Events.NetworkManager.RequestFinished'),
|
|
},
|
|
};
|
|
|
|
module.exports = {Events};
|