mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: pass down config form CDP connection to BiDi (#12366)
This commit is contained in:
parent
3103744a67
commit
110351aaf5
@ -47,7 +47,12 @@ export async function connectBidiOverCdp(
|
||||
// Forwards a BiDi event sent by BidiServer to Puppeteer.
|
||||
pptrTransport.onmessage(JSON.stringify(message));
|
||||
});
|
||||
const pptrBiDiConnection = new BidiConnection(cdp.url(), pptrTransport);
|
||||
const pptrBiDiConnection = new BidiConnection(
|
||||
cdp.url(),
|
||||
pptrTransport,
|
||||
cdp.delay,
|
||||
cdp.timeout
|
||||
);
|
||||
const bidiServer = await BidiMapper.BidiServer.createAndStart(
|
||||
transportBiDi,
|
||||
cdpConnectionAdapter,
|
||||
|
@ -26,11 +26,6 @@ import {CdpCDPSession} from './CDPSession.js';
|
||||
const debugProtocolSend = debug('puppeteer:protocol:SEND ►');
|
||||
const debugProtocolReceive = debug('puppeteer:protocol:RECV ◀');
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type {ConnectionTransport, ProtocolMapping};
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
@ -64,6 +59,13 @@ export class Connection extends EventEmitter<CDPSessionEvents> {
|
||||
return session.connection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
get delay(): number {
|
||||
return this.#delay;
|
||||
}
|
||||
|
||||
get timeout(): number {
|
||||
return this.#timeout;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user