Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Pass cdp options to CDP.new() #103

Merged
merged 2 commits into from
Aug 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/chrome/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ export default class LocalChrome implements Chrome {
logLevel: this.options.debug ? 'info' : 'silent',
port: this.options.cdp.port
})
return await CDP({ port: this.chromeInstance.port })
const { host, secure } = this.options.cdp;
return await CDP({ port: this.chromeInstance.port, host, secure })
}

private async connectToChrome(): Promise<Client> {
const target = await CDP.New()
const { port, host, secure } = this.options.cdp;
const target = await CDP.New({ port, host, secure });
return await CDP({ target })
}

Expand Down