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

scrollparent

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scrollparent

A function to get the scrolling parent of an html element.

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is scrollparent?

The scrollparent npm package is a utility that helps you find the scrollable parent of a given DOM element. This can be useful in various scenarios where you need to determine the element responsible for scrolling, such as custom scroll handling, sticky elements, or infinite scrolling implementations.

What are scrollparent's main functionalities?

Find Scroll Parent

This feature allows you to find the scrollable parent of a given DOM element. The code sample demonstrates how to use the scrollparent package to find and log the scrollable parent of an element with the ID 'myElement'.

const scrollParent = require('scrollparent');
const element = document.getElementById('myElement');
const parent = scrollParent(element);
console.log(parent);

Other packages similar to scrollparent

Keywords

FAQs

Package last updated on 28 May 2023

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