
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
seamless-scroll-polyfill
Advanced tools
This repo is forked from iamdustan/smoothscroll and rewritten with TypeScript.
# npm
npm install seamless-scroll-polyfill --save
# yarn
yarn add seamless-scroll-polyfill
import { polyfill } from "seamless-scroll-polyfill";
polyfill();
import { polyfill } from "seamless-scroll-polyfill/esm/Element.scrollIntoView.js";
polyfill();
import { elementScrollIntoView } from "seamless-scroll-polyfill";
elementScrollIntoView(document.querySelector("#target"), { behavior: "smooth", block: "center", inline: "center" });
<script src="https://cdn.jsdelivr.net/npm/seamless-scroll-polyfill@1.0.0/dist/es5/seamless.min.js"></script>
<script>
// patch all methods
seamless.polyfill();
// or use specific methods
seamless.windowScrollBy({ behavior: "smooth", top: 200, left: 0 });
seamless.elementScrollIntoView(document.querySelector("#target"), {
behavior: "smooth",
block: "center",
inline: "center",
});
</script>
<script
src="https://cdn.jsdelivr.net/npm/seamless-scroll-polyfill@1.0.0/dist/es5/seamless.auto-polyfill.min.js"
data-seamless
></script>
dir | dist/esm | dist/umd | dist/es6 | dist/es5 |
---|---|---|---|---|
module format | ES Modules | UMD | UMD | UMD |
ES version | ESNext | ESNext | ES2015 | ES5 |
FAQs
Smooth Scroll behavior polyfill
The npm package seamless-scroll-polyfill receives a total of 47,378 weekly downloads. As such, seamless-scroll-polyfill popularity was classified as popular.
We found that seamless-scroll-polyfill 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
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.