https://github.com/robdel12/scroll-to-bottom
A small promise aware helper function to scroll a webpage to the bottom.
https://github.com/robdel12/scroll-to-bottom
Last synced: about 1 year ago
JSON representation
A small promise aware helper function to scroll a webpage to the bottom.
- Host: GitHub
- URL: https://github.com/robdel12/scroll-to-bottom
- Owner: Robdel12
- Created: 2019-11-26T17:29:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-15T18:54:31.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T12:25:36.459Z (almost 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 1.01 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scroll To Bottom
A small promise aware helper function to scroll a webpage to the bottom. This
can be helpful for triggering lazy loading images (or anything using scroll
based observation).
## Usage
Once the function is included in the browser, you can use `scrollToBottom` with
the defaults, or pass options:
``` javascript
scrollToBottom();
scrollToBottom({ frequency: 50, timing: 5 });
```
### Options
- `options.frequency` (default: 100) - How many scroll increments
- `options.timing` (default: 8) - The amout of ms to pause between scroll
increments
- `options.remoteWindow` (default: `window`) - The browsers `window` object. Can
be handly for test runners like Cypress, which run the subjects test in a
remote iframe