Define referenceable algorithms for IntersectionObserver methods · Issue #427 · w3c/IntersectionObserver (original) (raw)
In whatwg/html#5510 I'm trying to specify <img loading=lazy>
in terms of IntersectionObserver as per discussion in whatwg/html#5236
As @domfarolino pointed out, in web specs we try not to call public APIs, but instead want to call the underlying algorithm directly. (Also see #401 )
For lazy-loaded images currently, we need to
- initialize a new
IntersectionObserver
with a callback that is a set of steps defined in spec prose - call
observe()
- call
unobserve()