main_world_eval
Allow scripts in the page's main world.
Use it for: Reading values exactly as the page's own scripts see them, and calling functions the page defines, from page.evaluate.
Browsers: Camoufox.
Details
- Type:
boolean - Default: false
- Example:
{"main_world_eval":true}
Enables page.evaluate("mw:" + script) to run in the page's own JavaScript world instead of an isolated one.
Main-world scripts are visible to the page.
Used in
- Case 74: Does the browser agree with its IP? Timezone, language and WebRTC through exits in three countries
- Case 16: What headless gives away, what headful fixes, and what neither does
- Case 15: Three countries, one script — and reading values the way the site does
- Camoufox: pinned version, macOS persona, no images
All options: launch options.