mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
refactor: rename secondary page to speculative session (#10817)
This commit is contained in:
parent
8233f61a45
commit
a9446f3d43
@ -43,7 +43,7 @@ export class EmulationManager {
|
|||||||
this.#secondaryClients.delete(client);
|
this.#secondaryClients.delete(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
async registerSecondaryPage(client: CDPSession): Promise<void> {
|
async registerSpeculativeSession(client: CDPSession): Promise<void> {
|
||||||
this.#secondaryClients.add(client);
|
this.#secondaryClients.add(client);
|
||||||
await this.#applyViewport(client);
|
await this.#applyViewport(client);
|
||||||
client.once(CDPSessionEmittedEvents.Disconnected, () => {
|
client.once(CDPSessionEmittedEvents.Disconnected, () => {
|
||||||
|
@ -182,7 +182,7 @@ export class FrameManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async registerSecondaryPage(client: CDPSessionImpl): Promise<void> {
|
async registerSpeculativeSession(client: CDPSessionImpl): Promise<void> {
|
||||||
await this.#networkManager.addClient(client);
|
await this.#networkManager.addClient(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,8 +266,12 @@ export class CDPPage extends Page {
|
|||||||
if (session._target()._subtype() !== 'prerender') {
|
if (session._target()._subtype() !== 'prerender') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.#frameManager.registerSecondaryPage(session).catch(debugError);
|
this.#frameManager
|
||||||
this.#emulationManager.registerSecondaryPage(session).catch(debugError);
|
.registerSpeculativeSession(session)
|
||||||
|
.catch(debugError);
|
||||||
|
this.#emulationManager
|
||||||
|
.registerSpeculativeSession(session)
|
||||||
|
.catch(debugError);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user