From 254a191e2aefe0dc7ad508b09c06c685ca2e0832 Mon Sep 17 00:00:00 2001 From: Vinyzu <50874994+Vinyzu@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:27:15 +0100 Subject: [PATCH] Delete unnecessary DOM Commands & Added Reference Disclaimer --- README.md | 2 ++ patchright_driver_patch.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 299217345..df26b1f7e 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,8 @@ If you choose to support our work, please contact [@vinyzu](https://discord.com/ Patchright is licensed [Apache 2.0](https://choosealicense.com/licenses/apache-2.0/) +[Some Parts](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/blob/main/patchright_driver_patch.js#L435-L448) of the Codebase are inspired by [Driverless](https://github.com/kaliiiiiiiiii/Selenium-Driverlesshttps://github.com/kaliiiiiiiiii/Selenium-Driverless). + --- ## Disclaimer diff --git a/patchright_driver_patch.js b/patchright_driver_patch.js index 8da5ef16e..347a03da1 100644 --- a/patchright_driver_patch.js +++ b/patchright_driver_patch.js @@ -467,11 +467,11 @@ getFrameMainFrameContextIdMethod.setBodyText( // -- _context Method -- const contextMethodCode = ` - await this._page._delegate._mainFrameSession._client._sendMayFail('DOM.enable'); + /* await this._page._delegate._mainFrameSession._client._sendMayFail('DOM.enable'); var globalDoc = await this._page._delegate._mainFrameSession._client._sendMayFail('DOM.getFrameOwner', { frameId: this._id }); if (globalDoc) { await this._page._delegate._mainFrameSession._client._sendMayFail("DOM.resolveNode", { nodeId: globalDoc.nodeId }) - } + } */ // if (this.isDetached()) throw new Error('Frame was detached'); try {