diff --git a/packages/puppeteer-core/src/common/EmulationManager.ts b/packages/puppeteer-core/src/common/EmulationManager.ts index 96b9484a..e25530d8 100644 --- a/packages/puppeteer-core/src/common/EmulationManager.ts +++ b/packages/puppeteer-core/src/common/EmulationManager.ts @@ -43,7 +43,7 @@ export class EmulationManager { this.#secondaryClients.delete(client); } - async registerSecondaryPage(client: CDPSession): Promise { + async registerSpeculativeSession(client: CDPSession): Promise { this.#secondaryClients.add(client); await this.#applyViewport(client); client.once(CDPSessionEmittedEvents.Disconnected, () => { diff --git a/packages/puppeteer-core/src/common/FrameManager.ts b/packages/puppeteer-core/src/common/FrameManager.ts index 67c7164e..8ea77603 100644 --- a/packages/puppeteer-core/src/common/FrameManager.ts +++ b/packages/puppeteer-core/src/common/FrameManager.ts @@ -182,7 +182,7 @@ export class FrameManager extends EventEmitter { } } - async registerSecondaryPage(client: CDPSessionImpl): Promise { + async registerSpeculativeSession(client: CDPSessionImpl): Promise { await this.#networkManager.addClient(client); } diff --git a/packages/puppeteer-core/src/common/Page.ts b/packages/puppeteer-core/src/common/Page.ts index 54cfbb07..4676dad4 100644 --- a/packages/puppeteer-core/src/common/Page.ts +++ b/packages/puppeteer-core/src/common/Page.ts @@ -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); } ); }