Changes the lazy load intersection observer's init dictionary to use a scrollMargin instead of a rootMargin.
This allows lazy loading images contained inside CSS scrollers, like carousels, to load as expected when near the viewport instead of the current behavior where these images load when at least one pixel is intersecting the viewport.
WebKittens
@smfr
Title of the spec
Lazy load scroll margin
URL to the spec
https://html.spec.whatwg.org/#lazy-load-root-margin
URL to the spec's repository
https://github.com/whatwg/html
Issue Tracker URL
https://github.com/w3c/IntersectionObserver/issues/431
Explainer URL
https://gist.github.com/tcaptan-cr/bf0ac25f77cb6b6c58c916e6577d91c3
TAG Design Review URL
No response
Mozilla standards-positions issue URL
https://github.com/mozilla/standards-positions/issues/933
WebKit Bugzilla URL
https://bugs.webkit.org/show_bug.cgi?id=264864
Radar URL
No response
Description
Changes the lazy load intersection observer's init dictionary to use a scrollMargin instead of a rootMargin.
This allows lazy loading images contained inside CSS scrollers, like carousels, to load as expected when near the viewport instead of the current behavior where these images load when at least one pixel is intersecting the viewport.