remove instance prop
This commit is contained in:
parent
e7e5124edd
commit
4a4d930de7
|
|
@ -20,15 +20,12 @@ import { APIRequestContext } from './fetch';
|
||||||
import { Events } from './events';
|
import { Events } from './events';
|
||||||
|
|
||||||
export class MockingProxy extends ChannelOwner<channels.MockingProxyChannel> {
|
export class MockingProxy extends ChannelOwner<channels.MockingProxyChannel> {
|
||||||
private _port: number;
|
|
||||||
private _browserRequests = new Map<string, network.Request>();
|
private _browserRequests = new Map<string, network.Request>();
|
||||||
|
|
||||||
constructor(parent: ChannelOwner, type: string, guid: string, initializer: channels.MockingProxyInitializer) {
|
constructor(parent: ChannelOwner, type: string, guid: string, initializer: channels.MockingProxyInitializer) {
|
||||||
super(parent, type, guid, initializer);
|
super(parent, type, guid, initializer);
|
||||||
|
|
||||||
this._port = initializer.port;
|
|
||||||
const requestContext = APIRequestContext.from(initializer.requestContext);
|
const requestContext = APIRequestContext.from(initializer.requestContext);
|
||||||
|
|
||||||
this._channel.on('route', async (params: channels.MockingProxyRouteEvent) => {
|
this._channel.on('route', async (params: channels.MockingProxyRouteEvent) => {
|
||||||
const route = network.Route.from(params.route);
|
const route = network.Route.from(params.route);
|
||||||
route._context = requestContext;
|
route._context = requestContext;
|
||||||
|
|
@ -61,7 +58,7 @@ export class MockingProxy extends ChannelOwner<channels.MockingProxyChannel> {
|
||||||
}
|
}
|
||||||
|
|
||||||
port(): number {
|
port(): number {
|
||||||
return this._port;
|
return this._initializer.port;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue