Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asr-scroll-position

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asr-scroll-position - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

18

index.js

@@ -34,11 +34,13 @@ const historyState = require(`better-history-api`)

afterSuccessfulStateChange(stateRouter, () => {
const anchorElement = getElementById(currentAnchor())
window.requestAnimationFrame(() => {
const anchorElement = getElementById(currentAnchor())
if (anchorElement) {
scrollToElement(anchorElement)
} else if (atTop()) {
updatePosition()
} else {
scrollToTop()
}
if (anchorElement) {
scrollToElement(anchorElement)
} else if (atTop()) {
updatePosition()
} else {
scrollToTop()
}
})
})

@@ -45,0 +47,0 @@ })

{
"name": "asr-scroll-position",
"version": "1.0.1",
"version": "1.1.0",
"description": "Manually update the browser's scroll position when using pushState routing with abstract-state-router",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc