1.0.4 • Published 6 years ago

size-listener v1.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

size-listener

通过scroll间接监听元素尺寸变化

image

使用方法:

npm install size-listener
// listen
import SizeListener from "size-listener";
const cb = function(width:number, height:number){ console.log(width, height) };
const dom = document.querySelector(".target");
const listener = new SizeListener(dom, cb);
// destroy
listener.destroy();
1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago