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

Fix iframe.contentWindow.document issues #327

Closed
wants to merge 1 commit into from
Closed

Conversation

Niek
Copy link
Collaborator

@Niek Niek commented Sep 16, 2020

This should fix the issues seen in e.g. Doubleclick tags.

Thanks to: #202 (comment) #137 (comment) #324 (comment) @Phyks @trnj

Note that the test fails because iframe.srcdoc setter is not working - has it ever worked?

@Niek
Copy link
Collaborator Author

Niek commented Sep 17, 2020

Note that the test fails because iframe.srcdoc setter is not working - has it ever worked?

Hello.

I think srcdoc should be "/**/", right?

iframe.srcdoc = "/**/"

What do you mean, in the test case? Can you link the line number?

@vladtreny
Copy link

Ok, my mistake. An extension in my browser changes HTMLIFrameElement.prototype. Sorry, ignore. But at least double-checked that above evasion works correctly :)

@berstend
Copy link
Owner

berstend commented Sep 27, 2020

srcdoc as a storied history of being buggy with pptr, I'd need to do some testing to see the current status of things (it's been a year or so since I last worked on the iframe.contentWindow issue).

It would also be interesting to compare with playwright as AFAIK this should be fixed through their more robust context implementation (which also affected window.open).

Relevant issues:
puppeteer/puppeteer#4960
puppeteer/puppeteer#1106 (comment)

@berstend
Copy link
Owner

I'm gonna look into this PR (and srcdoc) soon, will probably also update the evasion to use the new stealth utilities (#318).

@berstend
Copy link
Owner

berstend commented Nov 3, 2020

Made obsolete by #318

@berstend berstend closed this Nov 3, 2020
@Niek Niek deleted the contentWindow-fix branch January 28, 2021 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants