You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto-generated PR for: make iframe depth variable
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Made iframe processing limits configurable and removed hard-coded caps.
Defaults now allow up to 100 iframes and 5 levels of depth to capture
more content while still preventing crashes.
- **New Features**
- Added BrowserProfile.max_iframes and BrowserProfile.max_iframe_depth.
- Threaded settings through BrowserSession and DOM watchdog to
DomService.
- DomService uses these values to cap snapshot documents and recursion,
with warnings when limiting.
<!-- End of auto-generated description by cubic. -->
Copy file name to clipboardExpand all lines: browser_use/browser/profile.py
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -590,6 +590,15 @@ class BrowserProfile(BrowserConnectArgs, BrowserLaunchPersistentContextArgs, Bro
590
590
default=True,
591
591
description='Enable cross-origin iframe support (OOPIF/Out-of-Process iframes). When False, only same-origin frames are processed to avoid complexity and hanging.',
592
592
)
593
+
max_iframes: int=Field(
594
+
default=100,
595
+
description='Maximum number of iframe documents to process to prevent crashes.',
596
+
)
597
+
max_iframe_depth: int=Field(
598
+
ge=0,
599
+
default=5,
600
+
description='Maximum depth for cross-origin iframe recursion (default: 5 levels deep).',
0 commit comments