puppeteer/experimental/puppeteer-firefox/lib/Events.js
Andrey Lushnikov afb9355b15
feat(firefox): basic support for Network (#3988)
This patch introduces basic Request and Response events for
page. It also teaches navigation methods, e.g. `page.goto` to return
navigation response.
2019-02-12 17:38:48 -08:00

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};