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

@dreamworld/web-util

Package Overview
Dependencies
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dreamworld/web-util - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

2

package.json
{
"name": "@dreamworld/web-util",
"version": "1.4.0",
"version": "1.4.1",
"description": "",

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

@@ -14,3 +14,14 @@

const elementRect = element.getBoundingClientRect();
if (elementRect.top < (scrollElementRect.top + offsetTop) || elementRect.bottom > (scrollElementRect.bottom - offsetBottom)) {
let scrollElementTop = scrollElementRect.top;
let scrollElementBottom = scrollElementRect.bottom;
//If given scrolling element as a document scroll
//Document it-self hide from view-port, so this logic is written.
if(document.scrollingElement === scrollElement) {
scrollElementTop = 0;
scrollElementBottom = window.innerHeight;
}
if (elementRect.top < (scrollElementTop + offsetTop) || elementRect.bottom > (scrollElementBottom - offsetBottom)) {
return false;

@@ -17,0 +28,0 @@ }

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