3 ms·
As far as the scrolling goes, I'm fairly certain they're just using native scrolling (as in, not using a JS implementation that doesn't get the weighting right)
by JohnDotAwesome 10y ago
As far as the scrolling goes, I'm fairly certain they're just using native scrolling (as in, not using a JS implementation that doesn't get the weighting right). The AMP Runtime needs to know scroll position, and they seem to just be capturing scroll information on the scroll event
See https://github.com/ampproject/amphtml/blob/master/src/service/viewport-impl.js#L795 https://github.com/ampproject/amphtml/blob/master/src/servic...
I may be wrong on this, as I don't know enough about the codebase. However, I'm pretty sure it's just native scrolling.
- MBCook 10y ago> The AMP Runtime needs to know scroll position Just querying the existing position shouldn't cause it to feel faster. What do they need to know that for anyway? I promise you 100% that it doesn't feel right. I'm not saying they invented their own page renderer in JS and are using a canvas element for output, but they've done something that changes the feel. I've seen it on other sites too, I assume it's some JS/CSS thing.
- wnevets 10y ago>Just querying the existing position shouldn't cause it to feel faster. What do they need to know that for anyway? tracking.
- charrondev 10y agoIt's a simple CSS overflow property that Apple has included in Safari.