Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
virtual-scroll
Advanced tools
Custom scroll event with inertia/momentum, touch (works on <=iOS7) and keyboard compatible. This is a fork of Bartek Drozdz VirtualScroll util. See his article) for a complete description.
npm i virtual-scroll -S
For in-depth usage and tutorial, you can check Bartek's article (link above).
new VirtualScroll(options)
Return a new instance of VirtualScroll. See the options below.
instance.on(fn, context)
Listen to the scroll event using the specified function (fn) and optional context.
instance.off(fn, context)
Remove the listener.
instance.destroy()
Will remove all events and unbind the DOM listeners.
Events note:
Each instance will listen only once to any DOM listener. These listener are enabled/disabled automatically. However, it's a good practice to always call destroy()
on your VirtualScroll instance, especially if you are working with a SPA.
e.preventDefault
on touchMove. Defaults to false.preventDefault
on touchMove. For instance, useful for a scrolling text inside a VirtualScroll-controled element. Defaults to vs-touchmove-allowed
.MIT.
FAQs
Custom scroll events for smooth, fake scroll
The npm package virtual-scroll receives a total of 7,851 weekly downloads. As such, virtual-scroll popularity was classified as popular.
We found that virtual-scroll demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.