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
🚀 Remove custom-elements and IntersectionObserver polyfill for SxG. #29971
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.
We also need to strip in in src/friendly-iframe-embed-legacy.js
and src/friendly-iframe-embed.js
@jridgewell Kris mentioned that IntersectionObserver may also not be needed in SxG, should I just remove that in this PR also? |
Just finished. |
@xiexr151e What is the size reduction? |
1.96KB, after comparing ESM to SxG binary size. |
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.
LGTM
…mpproject#29971) * remove custom elements polyfill * undo viewport * remove install in embed * remove IntersectionObserver * lint * remove 2 polyfills for esm/sxg Co-authored-by: Derek Tse <derektse@google.com>
@jridgewell mentioned that the custom-elements polyfill could be removed for the SxG build. This PR is a one line change that achieves that.
In addition, the IntersectionObserver polyfill can also be removed as mentioned by @erwinmombay.