New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

seamless-scroll-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seamless-scroll-polyfill - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

lib/scroll-end-event.d.ts

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [2.3.0](https://github.com/magic-akari/seamless-scroll-polyfill/compare/v2.2.1...v2.3.0) (2023-01-26)
### Features
* support scrollend event ([5072b41](https://github.com/magic-akari/seamless-scroll-polyfill/commit/5072b418f88e842105138b6159729e1a564a1357))
## [2.2.1](https://github.com/magic-akari/seamless-scroll-polyfill/compare/v2.2.0...v2.2.1) (2023-01-26)

@@ -2,0 +9,0 @@

9

lib/scroll.js
import { backupMethod, checkBehavior, elementScrollXY, failedExecute, failedExecuteInvalidEnumValue, isObject, scrollingElement, } from "./common.js";
import { scrollEndEvent } from "./scroll-end-event.js";
import { now, step } from "./scroll-step.js";

@@ -38,6 +39,12 @@ // https://drafts.csswg.org/cssom-view/#normalize-non-finite-values

};
const callback = () => {
removeEventListener();
const isDocument = element.nodeType === /** Node.DOCUMENT_NODE */ 9;
element.dispatchEvent(scrollEndEvent(isDocument));
};
const context = Object.assign(Object.assign({}, config), { timeStamp: now(), startX,
startY,
targetX,
targetY, rafId: 0, method, callback: removeEventListener });
targetY, rafId: 0, method,
callback });
const cancelScroll = () => {

@@ -44,0 +51,0 @@ window.cancelAnimationFrame(context.rafId);

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Smooth Scroll behavior polyfill",
"version": "2.2.1",
"version": "2.3.0",
"author": {

@@ -8,0 +8,0 @@ "name": "Dustan Kasten",

@@ -10,2 +10,3 @@ import {

} from "./common.js";
import { scrollEndEvent } from "./scroll-end-event.js";
import type { IContext, IScrollConfig } from "./scroll-step";

@@ -59,2 +60,8 @@ import { now, step } from "./scroll-step.js";

const callback = () => {
removeEventListener();
const isDocument = element.nodeType === /** Node.DOCUMENT_NODE */ 9;
element.dispatchEvent(scrollEndEvent(isDocument));
};
const context: IContext = {

@@ -69,3 +76,3 @@ ...config,

method,
callback: removeEventListener,
callback,
};

@@ -72,0 +79,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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