3b180923a6
Juggler now implements the same "flatten" protocol as CDP. This patch: * copies `Connection.js` from original Puppeteer (with a few renames, e.g. `CDPSesssion` -> `JugglerSession`). * migrates code to support protocol-level sessions
54 lines
1.5 KiB
JavaScript
54 lines
1.5 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: {
|
|
Disconnected: 'disconnected',
|
|
TargetCreated: 'targetcreated',
|
|
TargetChanged: 'targetchanged',
|
|
TargetDestroyed: 'targetdestroyed',
|
|
},
|
|
BrowserContext: {
|
|
TargetCreated: 'targetcreated',
|
|
TargetChanged: 'targetchanged',
|
|
TargetDestroyed: 'targetdestroyed',
|
|
},
|
|
|
|
Connection: {
|
|
Disconnected: Symbol('Events.Connection.Disconnected'),
|
|
},
|
|
|
|
JugglerSession: {
|
|
Disconnected: Symbol('Events.JugglerSession.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};
|