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

element-position

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

element-position - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

2

dist/index.js

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Position=e()}(this,function(){"use strict";return{getNestedOffset:function(t){for(var e=t.offsetLeft,f=t.offsetTop,o=t.offsetLeft+t.offsetWidth,s=t.offsetTop+t.offsetHeight;t=t.offsetParent;)e+=t.offsetLeft,f+=t.offsetTop,o+=t.offsetLeft,s+=t.offsetTop;return{left:e,top:f,right:o,bottom:s}},getNestedScroll:function(t){for(var e=0,f=0;t=t.parentElement;)e+=t.scrollLeft,f+=t.scrollTop;return{x:e,y:f}},getAbsolute:function(t){var e=this.getNestedOffset(t),f=this.getNestedScroll(t);return{left:e.left-f.x,top:e.top-f.y,right:e.right-f.x,bottom:e.bottom-f.y}}}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Position=e()}(this,function(){"use strict";function o(t){for(var e=t.offsetLeft,f=t.offsetTop,o=t.offsetLeft+t.offsetWidth,n=t.offsetTop+t.offsetHeight;t=t.offsetParent;)e+=t.offsetLeft,f+=t.offsetTop,o+=t.offsetLeft,n+=t.offsetTop;return{left:e,top:f,right:o,bottom:n}}function n(t){for(var e=0,f=0;t=t.parentElement;)e+=t.scrollLeft,f+=t.scrollTop;return{x:e,y:f}}return{getNestedOffset:o,getNestedScroll:n,getAbsolute:function(t){var e=o(t),f=n(t);return{left:e.left-f.x,top:e.top-f.y,right:e.right-f.x,bottom:e.bottom-f.y}}}});
{
"name": "element-position",
"version": "0.1.3",
"version": "0.1.4",
"description": "Calculates the position of the DOM.",

@@ -25,3 +25,3 @@ "main": "dist/index.js",

"scripts": {
"rollup": "rollup --config rollup.config.js"
"build": "rollup --config rollup.config.js"
},

@@ -28,0 +28,0 @@ "license": "MIT",

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