Skip to content

v0.0.4

Latest
Compare
Choose a tag to compare
@TahaSh TahaSh released this 27 Jul 15:50

In this release, you can use a function for specifying an offset value. This will allow you to have dynamic values for offsets (for example, when using window.innerHeight). This will be helpful in case the user resizes the window.

Example:

ScrollObserver.Element(element, {
  offsetBottom: () => window.innerHeight - element.clientHeight
})