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);
|
||||
}
|
||||
|
||||
async registerSecondaryPage(client: CDPSession): Promise<void> {
|
||||
async registerSpeculativeSession(client: CDPSession): Promise<void> {
|
||||
this.#secondaryClients.add(client);
|
||||
await this.#applyViewport(client);
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -266,8 +266,12 @@ export class CDPPage extends Page {
|
||||
if (session._target()._subtype() !== 'prerender') {
|
||||
return;
|
||||
}
|
||||
this.#frameManager.registerSecondaryPage(session).catch(debugError);
|
||||
this.#emulationManager.registerSecondaryPage(session).catch(debugError);
|
||||
this.#frameManager
|
||||
.registerSpeculativeSession(session)
|
||||
.catch(debugError);
|
||||
this.#emulationManager
|
||||
.registerSpeculativeSession(session)
|
||||
.catch(debugError);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user