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

@livelybone/scroll-get

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@livelybone/scroll-get

A module for position relative to page or client

  • 3.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
328
decreased by-40.15%
Maintainers
1
Weekly downloads
 
Created
Source

@livelybone/scroll-get

NPM Version Download Month gzip with dependencies: kb pkg.module

pkg.module supported, which means that you can apply tree-shaking in you project

A module for position relative to page or client

repository

https://github.com/livelybone/scroll-get.git

Demo

https://livelybone.github.io/tool/scroll-get

Installation

npm i -S @livelybone/scroll-get

Global name

ScrollGet

Usage

import {getRect, posRelativeToPage, posRelativeToClient} from '@livleybone/scroll-get'

/**
 * @result { DOMRect | ClientRect | TextRectangle }
 * */
var rect = getRect(document.getElementById('id'))
/**
 * @result { Object: {pageLeft:Number, pageTop:Number} }
 * */
var pos = posRelativeToPage(document.getElementById('id'))
/**
 * @result { Object: {clientLeft:Number, clientTop:Number} }
 * */
var pos1 = posRelativeToClient(document.getElementById('id'))

Keywords

FAQs

Package last updated on 28 Dec 2018

Did you know?

Socket

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.

Install

Related posts

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