layzr.js icon indicating copy to clipboard operation
layzr.js copied to clipboard

IntersectionObserver API Support

Open keithws opened this issue 7 years ago • 1 comments

Do you have any plans to support the IntersectionObserver API? It is supposed to be more performant than Element.getBoundingClientRect() and is becoming widely supported.

keithws avatar Jan 05 '18 03:01 keithws

will likely update this lib at some point, if i find the time

if you want to use IntersectionObserver for the time being, check out obzerv. it tracks elements relative to the viewport in a more general sense. there's an example on the README that shows how to load an image lazily

callmecavs avatar Jan 05 '18 16:01 callmecavs