
Security News
Open VSX Begins Implementing Pre-Publish Security Checks After Repeated Supply Chain Incidents
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.
infinity-component
Advanced tools
Unload and reload panes while scrolling. Inspired by airbnb/infinity.
Install with component(1):
$ component install component/infinity
var infinity = require('infinity')(window);
var panes = document.querySelectorAll('.pane');
for(var i = 0, len = panes.length; i < len; i++) {
infinity.add(panes[i]);
}
infinity.refresh();
loading: called once before each visible el is loaded. useful for batch operations.load: called when a el is to be loaded.unloading: called once before each el is unloaded. useful for batch operations.unload: called when an el is to be unloaded.Initialize infinity with el. el can be either the window or an element with overflow.
Add el to infinity. You may pass any number of arguments
to be called with the load and unload functions. The
first argument must be the element node.
infinity.add(view.el, view)
Remove an element from infinity.
infinity.remove(el)
Add a load function. Defaults to a noop.
The arguments passed to add will be passed
through load.
infinity.load(function(el, view) {
// ...
});
Add an unload function. Defaults to a noop.
The arguments passed to add will be passed
through unload.
infinity.unload(function(el, view) {
// ...
});
Refresh, loading and unloading elements. Call this after adding elements, removing elements, or moving elements programmatically.
infinity.refresh();
Add "preload margin" to each side of the container.
This will allow you to start loading elements before
they appear in viewport. n defaults to 0.
For example, for infinity.margin(200), the load
function would trigger when the element is within
200px from being in view.
Unbind all infinity events
MIT
FAQs
infinite scrolling with loading and unloading
The npm package infinity-component receives a total of 14 weekly downloads. As such, infinity-component popularity was classified as not popular.
We found that infinity-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers 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
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.