alexjoverm/v-lazy-image

Add Polyfill intersection-observer

ridhoassuryadi opened this issue · 3 comments

Hi I have a problem when using this library when on a Safari Browser. Namely the problem of the absence of fire observer-intersections on safari. can you add it to this library?

I think it would be better to handle adding the polyfill yourself - however I do think that the library should automatically detect if the browser supports IntersectionObserver or not because otherwise it will throw errors, especially when observer.disconnect() is called here

Yes, it's better to handle the polyfill yourself. It wouldn't be a bad idea to have some checks in the library for sure.

From 1.3.1, it will check for IntersectionObserver and throw an Error if it doesn't find it 🎉