diff --git a/packages/puppeteer-core/src/cdp/Frame.ts b/packages/puppeteer-core/src/cdp/Frame.ts index 65655944112..41e0d1c8a4c 100644 --- a/packages/puppeteer-core/src/cdp/Frame.ts +++ b/packages/puppeteer-core/src/cdp/Frame.ts @@ -283,7 +283,10 @@ export class CdpFrame extends Frame { // We rely upon the fact that document.open() will reset frame lifecycle with "init" // lifecycle event. @see https://crrev.com/608658 - await this.setFrameContent(html); + await this.#client.send('Page.setDocumentContent', { + html, + frameId: this._id, + }); const watcher = new LifecycleWatcher( this._frameManager.networkManager,