Zoid iframe support does not work with Chrome 76, 77
See original GitHub issueZoid iframe support does not work with Chrome 76, 77 which will be released soon. The props are not passed down into window.xprops which is undefined inside the zoid iframe. In Chrome 75 the problem is not reproducible.
Further investigation shows that on Chrome 76, 77 window.name is empty inside the child page and zoid depends on the name to make the connection between parent and child pages. The error starts in https://github.com/krakenjs/zoid/blob/a27434d5452a2f18a41116baceb654c414e0e294/src/child/window.js at line 38 where window.name is used:
export function getChildPayload() : ?ChildPayload { try { return parseChildWindowName(window.name); } catch (err) { // pass } }
The thrown exception is not logged.
Notes:
- The parent and the child pages must be on different domains.
- zoid version: 9.0.27
- The Chrome 76, 77 changes can be found here: https://www.chromestatus.com/features#milestone%3D76
- Chrome 77 can be downloaded here: https://www.google.com/intl/en/chrome/canary/
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
zoid - UNPKG
zoid /README.md ; 7, - Render an iframe or popup on a different domain, and pass down props, including objects and functions ;...
Read more >Chrome 108 iframe problem - Google Support
After upgrading to Chrome 108, few pages with iframe and forms encounters the error - no dropdown on the form. But on the...
Read more >Upcoming chrome changes and breaking issues with iframes
There are some upcoming changes being rolled out to chrome in Jan 2020 involving default behavior of the samesite property in cookies, ...
Read more >Lazy loading via attribute for images & iframes - CanIUse
The loading attribute on images & iframes gives authors control over when the browser should start loading the resource. Usage % of. all...
Read more >zoid-demo - npm
A forkable demo repo for zoid to help you get started. zoid is a cross-domain component library which helps you render iframes and...
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
OK. I repro’d the race-condition in a simplified environment at http://bluesuncorp.co.uk/icv4/foo.htm
Got it so the bug appears in canary but not standard chrome. The issue was the window name was being set AFTER the window location. That works in chrome but not canary.
I’ll roll out the paypal sdk with this fix this week. Thanks again for catching this! As mentioned zoid is published with the fix.
@StanculescuDaniel thank you tremendously for identifying and isolating this issue, and of course to @bluepnume for fixing it. I invested only a mere hour tonight in what would have been much worse otherwise.