-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
refac: use resize observer instead of mutation observer #1547
Conversation
const observer = new ResizeObserver(updateIframeHeight); | ||
|
||
updateIframeHeight(); | ||
observer.observe(document.body); |
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.
Not sure if it's a good idea to listen on body.
size-limit report 📦
|
Codecov ReportBase: 58.04% // Head: 58.02% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1547 +/- ##
==========================================
- Coverage 58.04% 58.02% -0.03%
==========================================
Files 131 131
Lines 2920 2911 -9
Branches 746 743 -3
==========================================
- Hits 1695 1689 -6
+ Misses 1093 1091 -2
+ Partials 132 131 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
7c90435
to
9d7a807
Compare
Refactor resizing mechanism with more sutable browser API.