mirror of
https://github.com/microsoft/playwright.git
synced 2024-09-20 16:58:47 +03:00
chore(webkit): remove url from Connection (#199)
This commit is contained in:
parent
c61c5b056f
commit
c9bc103a00
@ -30,7 +30,6 @@ export const ConnectionEvents = {
|
||||
};
|
||||
|
||||
export class Connection extends EventEmitter {
|
||||
private _url: string;
|
||||
_lastId = 0;
|
||||
private _callbacks = new Map<number, {resolve:(o: any) => void, reject: (e: Error) => void, error: Error, method: string}>();
|
||||
private _delay: number;
|
||||
@ -38,9 +37,8 @@ export class Connection extends EventEmitter {
|
||||
private _sessions = new Map<string, TargetSession>();
|
||||
_closed = false;
|
||||
|
||||
constructor(url: string, transport: ConnectionTransport, delay: number | undefined = 0) {
|
||||
constructor(transport: ConnectionTransport, delay: number | undefined = 0) {
|
||||
super();
|
||||
this._url = url;
|
||||
this._delay = delay;
|
||||
|
||||
this._transport = transport;
|
||||
@ -52,10 +50,6 @@ export class Connection extends EventEmitter {
|
||||
return session._connection;
|
||||
}
|
||||
|
||||
url(): string {
|
||||
return this._url;
|
||||
}
|
||||
|
||||
send<T extends keyof Protocol.CommandParameters>(
|
||||
method: T,
|
||||
params?: Protocol.CommandParameters[T]
|
||||
|
@ -129,7 +129,7 @@ export class Launcher {
|
||||
let connection: Connection | null = null;
|
||||
try {
|
||||
const transport = new PipeTransport(webkitProcess.stdio[3] as NodeJS.WritableStream, webkitProcess.stdio[4] as NodeJS.ReadableStream);
|
||||
connection = new Connection('', transport, slowMo);
|
||||
connection = new Connection(transport, slowMo);
|
||||
const browser = new Browser(connection, defaultViewport, webkitProcess, gracefullyCloseWebkit);
|
||||
await browser._waitForTarget(t => t._type === 'page');
|
||||
return browser;
|
||||
|
Loading…
Reference in New Issue
Block a user