scroll-to-bottomjs
v1.1.0
Published
A small promise aware helper function to scroll a webpage to the bottom.
Downloads
63,789
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:
scrollToBottom();
scrollToBottom({ frequency: 50, timing: 5 });
Options
options.frequency
(default: 100) - How many scroll incrementsoptions.timing
(default: 8) - The amout of ms to pause between scroll incrementsoptions.remoteWindow
(default:window
) - The browserswindow
object. Can be handly for test runners like Cypress, which run the subjects test in a remote iframe