When emblaApi.slidesInView() is called intensely on scroll, there's a performance hit.
Describe the solution you'd like
The current implementation for slidesInView was build for the IE11 era. I'd like to get rid of the performance hit and refactor the slidesInView code so it's using IntersectionObserver instead, now that IE11 is dead.
⚠️ The slidesInView option will be replaced with the IntersectionObserver threshold so it will accept both a single number or an array of numbers:
Setup
const options = {
slidesInView: IntersectionObserverInit['threshold'] // Which is --> number | number[]
}
Feature request is related to
Is your feature request related to an issue?
emblaApi.slidesInView()
is called intensely on scroll, there's a performance hit.Describe the solution you'd like
slidesInView
was build for the IE11 era. I'd like to get rid of the performance hit and refactor theslidesInView
code so it's usingIntersectionObserver
instead, now that IE11 is dead.⚠️ The
slidesInView
option will be replaced with the IntersectionObserverthreshold
so it will accept both a single number or an array of numbers:Setup
Usage