
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
scroll-to-element
Advanced tools
Smooth scrolls to element of the specified selector or element reference with optional offset, scroll-positon, easing, and duration. Takes into account document height for elements low on the page.
scrollToElement(selector, <options>)
Add an additional offset to the final position. if > 0 then page is moved to the bottom otherwise the page is moved to the top.
Alignment of the element in the resulting viewport. Can be one of
'top'
,'middle'
or'bottom'
. Defaulting to'top'
.
Easing function defaulting to "out-circ" (view ease for more)
Animation duration defaulting to
1000
var scrollToElement = require('scroll-to-element');
scrollToElement('#id');
// with options
scrollToElement('.className', {
offset: 0,
ease: 'out-bounce',
duration: 1500
});
// or if you already have a reference to the element
var elem = document.querySelector('.className');
scrollToElement(elem, {
offset: 0,
ease: 'out-bounce',
duration: 1500
});
MIT
FAQs
Smooth scrolling to an element via selector or node reference
We found that scroll-to-element 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.