Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puppeteer page.evaluateOnNewDocument not running in iframe #7353

Closed
stackedUI opened this issue Jun 23, 2021 · 3 comments
Closed

Puppeteer page.evaluateOnNewDocument not running in iframe #7353

stackedUI opened this issue Jun 23, 2021 · 3 comments

Comments

@stackedUI
Copy link

stackedUI commented Jun 23, 2021

Puppeteer page.evaluateOnNewDocument does not run in iframe other than in the iframe hosted locally.

Puppeteer script:

const puppeteer = require("puppeteer");

(async function () {
    const browser = await puppeteer.launch({
        headless: false
    });

    const page = await browser.newPage();
    await page.evaluateOnNewDocument(() => {
        setTimeout(() => {
            console.log(window.location.href)
        }, 1000);
    }
    );
    await page.goto("http://127.0.0.1:5501/index.html");
})();

http://127.0.0.1:5501/index.html

<html lang="en">
<head>
</head>
<body>
    <iframe src="http://127.0.0.1:5501/frame.html"></iframe>
    <iframe src="https://chromedevtools.github.io/devtools-protocol/tot/Page"></iframe>
    <iframe src="https://pptr.dev/"></iframe>
</body></html>

Output from chrome console: (nothing from https://chromedevtools.github.io/devtools-protocol/tot/Page and https://pptr.dev/)

http://127.0.0.1:5501/sa.html

http://127.0.0.1:5501/frame.html
@sadym-chromium
Copy link
Collaborator

OOPiF is not supported by Puppeteer yet: #2548
Temporary fix can be using a chrome flag --single-process.

@stale
Copy link

stale bot commented Jun 24, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label Jun 24, 2022
@stale
Copy link

stale bot commented Jul 24, 2022

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!

@stale stale bot closed this as completed Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants