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

element-height-observer

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

element-height-observer - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

package.json
{
"name": "element-height-observer",
"version": "0.0.6",
"version": "0.0.7",
"description": "Allows you to add an efficient height listener to any dom element and execute a callback when its height changes",

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

@@ -15,5 +15,26 @@ # Element height observer

When the page has loaded, you can register the oberver like this:
Load the script:
```html
<html>
<head>
<script src="node_modules/element-height-observer/dist/index.js"></script>
</head>
</html>
```
Or import it:
```javascript
var heightObserver = require('element-height-observer');
var registerHeightObserver = heightObserver.registerHeightObserver;
var unregisterHeightObserver = heightObserver.unregisterHeightObserver;
```
Or import it (ES6 modules notation):
```javascript
import { registerHeightObserver, unregisterHeightObserver } from 'element-height-observer';
```
When the page has loaded, you can register the observer like this:
```javascript
window.addEventListener('load', function () {

@@ -20,0 +41,0 @@ var someElement = document.querySelector('#someElementId');

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