Support OOPIF
See original GitHub issueOut-of-process iframes are here now and have to be supported.
For the following HTML served from localhost
, pptr fails to report the frame:
<h1>Hello world</h1>
<script>
const frame = document.createElement('iframe')
frame.setAttribute('name', 'bob')
frame.setAttribute('src', 'https://google.com')
document.body.appendChild(frame)
</script>
Original example: https://github.com/achingbrain/puppeteer-frames Reported here: https://github.com/GoogleChrome/puppeteer/issues/1140#issuecomment-389054750
Issue Analytics
- State:
- Created 5 years ago
- Reactions:36
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Out-of-Process iframes (OOPIFs) - The Chromium Projects
This page provides an overview of Chromium's support for out-of-process iframes (OOPIFs), which allow a child frame of a page to be rendered...
Read more >FYI: Out-of-process iframes are now enabled (via
We have now added OOPIF support for drag and drop, added the ability to print an OOPIF, and fixed a handful of other...
Read more >Does Firefox, IE, Opera or Safari support OOPIF? (Out-of ...
Since Google Chrome v55 (and some previous versions) support for OOPIF (multi-threading iframes) is enabled by default.
Read more >455764 - OOPIF: Printing Support - chromium - Monorail
To print pages with out-of-process iframes, we will need to assemble a PDF based on output from several renderer processes. Each frame's renderer...
Read more >Site Isolation Design Document - Google Sites
9.1 Site Isolation Overview; 9.2 Chromium Changes for OOPIF ... To support a site-per-process policy in a multi-process web browser, we need to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
While we’re figuring this out, a workaround is to run with
--disable-features=site-per-process
flag:@aslushnikov could be willing to take a stab at this but how long this issue has been neglected makes me nervous that there may be some hidden dangers.
What would you say are the major concerns?
The change seems something like
use target attached/detatched/destroyed events with type=iframe as a hint to the frame tree and update the frame manager accordingly https://cs.chromium.org/chromium/src/content/browser/devtools/protocol/target_auto_attacher.cc?type=cs&sq=package:chromium&g=0&l=173
The frame needs its own CDPSession if created in this way instead of inheriting the parents so that it can use a separate sessionid, seems relatively straight-forward. Seems to be some finagling to do here so each instance ignores messages not meant for it
Commands that use the devtools Page domain that aren’t already on the Frame class may need to be changed to send to all frame’s sessions This one may be sketch. Some commands will be fine, like captureScreenshot which can exist only being dispatched to the root frame, but others wont. It looks like Page.addScriptToEvaluateOnNewDocument doesn’t filter to OOPIF so Page::exposeFunction() won’t work for them. That said, this limitation seems like something that could be slowly addressed over time in the future and not having it but having most other things seems strictly better.