Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async init () {
this._browser = await puppeteer.launch({
ignoreDefaultArgs: true,
args: DEFAULT_ARGS.concat(['--headless']),
defaultViewport: {width: 1920, height: 1080}
})
this._browser.on(Browser.Events.Disconnected, this._onDisconnected)
this._page = await this._browser.newPage()
this._client = this._page._client
await this._init()
this.requestMonitor = new RequestMonitor()
this.requestMonitor.attach(this._client)
this._warcGenerator.on('finished', this._onWARCGenFinished)
this._warcGenerator.on('error', this._onWARCGenError)
}