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.
Overall low as scroll margin also applies to the root element thus not affecting lazy loading images that are currently loading with just a root margin.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
This feature is behind an enabled-by-default flag that can be disabled if needed.
Shipping on desktop | 121 |
DevTrial on desktop | 121 |
Shipping on Android | 121 |
DevTrial on Android | 121 |
Shipping on WebView | 121 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFxahvsUb0GEG9WNWRN7Akkowjm03gLj%2Biiq5rG8%2BzdAWMBTNA%40mail.gmail.com.
Yes, that's correct.On Tue, Nov 21, 2023 at 9:18 PM Yoav Weiss <yoav...@chromium.org> wrote:Do I understand correctly that currently lazy-loaded images in CSS scrollers have suboptimal behavior and this would improve that without potentially harming other cases?On Wed, Nov 22, 2023 at 1:55 AM Traian Captan <tca...@chromium.org> wrote:
Thanks, that sounds like a strict improvement.On Wed, Nov 22, 2023 at 6:25 AM Traian Captan <tca...@chromium.org> wrote:Yes, that's correct.On Tue, Nov 21, 2023 at 9:18 PM Yoav Weiss <yoav...@chromium.org> wrote:Do I understand correctly that currently lazy-loaded images in CSS scrollers have suboptimal behavior and this would improve that without potentially harming other cases?On Wed, Nov 22, 2023 at 1:55 AM Traian Captan <tca...@chromium.org> wrote:A short (inline) explainer would help reviewers to understand e.g. if this involves changes to the API surface that developers need to care about.Can you write a few words on the impact on developers?The spec doesn't mention anything specific around root margins or scroll margins (other than the algorithm name).Are these concepts interoperable?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfVhH_QxckxRLbR05jrN0CY48aQ-Ag3BypusnsyKoDTc0A%40mail.gmail.com.
Thanks, that sounds like a strict improvement.
Explainer
NoneA short (inline) explainer would help reviewers to understand e.g. if this involves changes to the API surface that developers need to care about.Can you write a few words on the impact on developers?
Specification
https://html.spec.whatwg.org/#lazy-load-root-marginThe spec doesn't mention anything specific around root margins or scroll margins (other than the algorithm name).Are these concepts interoperable?
IntersectionObserverInit
dictionary with the following dictionary members: «[ "scrollMargin
" → lazy load scroll margin ]»"To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFxahvvCQF36A34oECY-0tpJVjTk%3D2gD_8WcwMWWAyc5_O3JFg%40mail.gmail.com.
LGTM2
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFxahvuw19j2DwRAV4kGecr_V%2BZ2D89nW5PdSUJ1z43HG7JW8g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/e34334bd-1d26-4f38-8e77-4540f2658fc5%40chromium.org.
Hi all!We were considering removing the lazy-loading inside the slider on shop.app product pages because the images appeared too late when scrolling, even on fast connections.I tested the new behaviour in Chrome Canary and it works perfectly, we won't have to change anything! Also, I'm not sure how the margin is configured, but in our case only the next image is loaded. This seems like a really good balance between performance and saving data.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/e31d74cb-ac07-4fd6-b5cd-c40e2360748en%40chromium.org.
Also, I'm not sure how the margin is configured, but in our case only the next image is loaded.