jquery.lazy icon indicating copy to clipboard operation
jquery.lazy copied to clipboard

Any chance to support Intersection Observer?

Open melcak opened this issue 7 years ago • 5 comments

Will you plan to implement Intersection Observer into this plugin?

melcak avatar Feb 24 '18 22:02 melcak

Maybe, yes. :wink: I will leave this open here as improvement.

dkern avatar Feb 26 '18 11:02 dkern

@eisbehr - I'll be happy to donate/sponsor this update to make this possible ;)

wpexplorer avatar Apr 28 '18 20:04 wpexplorer

Well, I'm open for this! So lets talk about this ...

Only thing I have in mind, is that these observer is not available in any version of IE. So how should this be done? Polyfill? Fallback? Ignore?

dkern avatar May 02 '18 07:05 dkern

Hello @melcak and @wpexplorer

I gave this a try and implemented a first approach into Lazy. It seems to work well and still supports all features of the original plugin. Only downside is the drop of support for IE and Safari. For this browser you will need to use a polyfill.

Maybe you want to test this too. I'm open for any feedback. The file is located in the IO Test Branch: https://github.com/eisbehr-/jquery.lazy/blob/intersection-observer/jquery.lazy.js

dkern avatar Jun 04 '18 11:06 dkern

Nice! I'm all in favor of IO, I've found the performance and UI are both better, but not a fan of the polyfill (the provided polyfill has 79 open issues, hasn't been updated since October 2018, and is 21.8 KB unminified). Maybe consider using feature detection to load a different file, like lazyload does. For those who want to polyfill they still can.

jklegseth avatar Feb 14 '19 23:02 jklegseth