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
Embed js height fix #22141
Embed js height fix #22141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, the issue was that loaded()
was called too early? I suppose document.readyState
can't be 'complete'
at the time this script is executed, can it? If it can, the initial check should probably be kept to ensure loaded()
is called even if the page is already in a 'complete'
readyState
.
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Probably smart to add the initial check back just in case. Added. |
* only begin iframe reheight once document state is complete * format * lint fixes * Update public/embed.js to use readystatechange event listener Co-authored-by: Claire <claire.github-309c@sitedethib.com> * Call loaded() if ready, otherwise add listenter * lint fix Co-authored-by: Claire <claire.github-309c@sitedethib.com>
* only begin iframe reheight once document state is complete * format * lint fixes * Update public/embed.js to use readystatechange event listener Co-authored-by: Claire <claire.github-309c@sitedethib.com> * Call loaded() if ready, otherwise add listenter * lint fix Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Fixes #22109 - executes the script to resize the iframes after
document.readyState === "complete"