code: function checkInfiniteBounds() {
      if (self.isLoading) return;
      var maxScroll = {};
  
      if (self.jsScrolling) {
        maxScroll = self.getJSMaxScroll();
        var scrollValues = self.scrollView.getValues();
        if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left) ||
          (maxScroll.top !== -1 && scrollValues.top >= maxScroll.top)) {
          onInfinite();
        }
      } else {
        maxScroll = self.getNativeMaxScroll();
        if ((
          maxScroll.left !== -1 &&
          self.scrollEl.scrollLeft >= maxScroll.left - self.scrollEl.clientWidth
          ) || (
          maxScroll.top !== -1 &&
          self.scrollEl.scrollTop >= maxScroll.top - self.scrollEl.clientHeight
          )) {
          onInfinite();
        }
      }
    }
docs: check if we've scrolled far enough to trigger an infinite scroll