Skip to content

Commit

Permalink
puppeteer: fix addBinding method to fully support iframes
Browse files Browse the repository at this point in the history
  • Loading branch information
nwebson committed Oct 24, 2024
1 parent 2d2e0bc commit ca8c1cc
Show file tree
Hide file tree
Showing 5 changed files with 2,560 additions and 1,170 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ In brief, it's a few lines of JavaScript on the page that are automatically call
Our fix disables the automatic `Runtime.Enable` command on every frame. Instead, we manually create contexts with unknown IDs when a frame is created. Then, when code needs to be executed, there are multiple ways to get the context ID.

#### 1. Create a new binding in the main world, call it and save its context ID.
🟢 Pros: The ultimate approach that keeps access to the main world and works with web workers. You don't need to change any of your existing codebase.
🟢 Pros: The ultimate approach that keeps access to the main world and works with web workers and iframes. You don't need to change any of your existing codebase.

🔴 Cons: None are discovered so far.

Expand Down Expand Up @@ -152,9 +152,9 @@ All these versions are just wrappers around Node.js version of Playwright. You n
## Puppeteer support
Latest fully tested version: 23.6.0 (2024-10-16)

✅ Versions 22.13.x and above are supported.
✅ Versions 23.6.x and above are supported.

❌ Versions 22.12.x and below are not supported.
❌ Versions 23.5.x and below are not supported.

## Playwright support
Playwright patches support `Runtime.enable` leak (only alwaysIsolated mode) and ability to change utility world name via `REBROWSER_PATCHES_UTILITY_WORLD_NAME` env variable.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rebrowser-patches",
"version": "1.0.13",
"version": "1.0.14",
"description": "Collection of patches for puppeteer and playwright to avoid automation detection and leaks. Helps to avoid Cloudflare and DataDome CAPTCHA pages. Easy to patch/unpatch, can be enabled/disabled on demand.",
"keywords": [
"automation",
Expand Down
Loading

0 comments on commit ca8c1cc

Please sign in to comment.