Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
scroll-restoration-polyfill
Advanced tools
Prevent the scroll restoration caused by the popstate event or back/forward buttons.
Prevent the scroll restoration caused by the
popstate
event or back/forward buttons. Demo
Warning: it works in Chrome, Safari, and Firefox 46+, but there's no IE/Edge support yet.
The polyfill has no API. Once included, just use the official API as described on Chrome Developers:
// Prevent the scroll, always
history.scrollRestoration = 'manual';
// Stop preventing the scroll
history.scrollRestoration = 'auto';
Pick your favorite:
<script src="dist/scroll-restoration-polyfill.browser.js"></script>
npm install --save scroll-restoration-polyfill
require('scroll-restoration-polyfill');
import 'scroll-restoration-polyfill';
Two lightweight dependencies, already included in scroll-restoration-polyfill
's
MIT © Federico Brigante
FAQs
Prevent the scroll restoration caused by the popstate event or back/forward buttons.
We found that scroll-restoration-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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.