-
Notifications
You must be signed in to change notification settings - Fork 523
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
Support iframe viewport tracking #465
Support iframe viewport tracking #465
Conversation
open question: do we want to do feature detection for iframe viewport tracking and replace native with the polyfill if support is missing? I'm leaning towards no and allowing consumers to detect it themselves. If they prefer the polyfill they can run delete InOb from window before running the polyfill. |
polyfill/intersection-observer.js
Outdated
rootRect = { | ||
top: 0, | ||
left: 0, | ||
right: html.clientWidth || body.clientWidth, | ||
width: html.clientWidth || body.clientWidth, | ||
bottom: html.clientHeight || body.clientHeight, | ||
height: html.clientHeight || body.clientHeight | ||
height: html.clientHeight || body.clientHeight, |
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.
Can't do this in IE :( No trailing commas. You might have to disable the prettier.
I think this is really close now. |
Darn. I believe I found a webkit bug. Essentially, Chrome and FF ensure that rootBounds when |
Current status:
@dvoytenko: PTAL |
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.
Looks very good!
Can we link the crbug issue here as well? |
summary
Implements iframe viewport tracking for the polyfill, as described in #372 (comment).
The following tasks have been completed:
Implementation already completed:
cc @dvoytenko