🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

scroll-to-bottomjs

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scroll-to-bottomjs

A small promise aware helper function to scroll a webpage to the bottom.

1.1.0
latest
Version published
Weekly downloads
22K
50.97%
Maintainers
1
Weekly downloads
 
Created

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 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

FAQs

Package last updated on 26 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts