
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A scroll event that fires only once per frame.
npm i raf-scroll --save
Every event call is sync on a requestAnimationFrame (raf) loop.
The triggered event contains 2 properties, scrollY and deltaY.
rafScroll.init()
Setup the singleton (allows to teardown/recreate at will). Needs to be called before using the lib.
rafScroll.add(callback)
Will call callback maximum once per frame, if the scroll value has changed.
An event will be passed containing the current scrollY as well as the deltaY.
rafScroll.addOnce(callback)
Same than add but only trigger the event once, then automatically unbinds itself. Useful for triggering behavior when user scrolls.
rafScroll.remove(callback)
Unbind the listener. Passing no callback will unbind all previous callbacks.
rafScroll.getCurrent()
Manually get the event (containing last scrollY/deltaY). Note that you need to wait at least 1 frame to have valid values since the scroll data is read in a requestAnimationFrame.
rafScroll.destroy()
Clean the singleton. It will auto-restart if you call rafScroll.init.
var rafScroll = require('raf-scroll');
rafScroll.add(function onScroll(event) {
if (window.innerHeight + event.scrollY >= document.offsetHeight - window.innerHeight * 0.5) {
triggerInfiniteScroll();
}
}
FAQs
A scroll event that fires only once per frame.
The npm package raf-scroll receives a total of 9 weekly downloads. As such, raf-scroll popularity was classified as not popular.
We found that raf-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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.