scrollview-resize
v1.0.2
Published
Report changes to the dimensions of an Element's scrollWidth and scrollHeight
Downloads
47
Maintainers
Readme
Why does this project exist?
Scrollview Resize provide the solution that we can report changes to the dimensions of an Element's scrollWidth and scrollHeight.
Installation
npm install scrollview-resize
// or yarn
yarn add scrollview-resize
Polyfill
ResizeObserver
is used in the code, IE dont support it, so you need polyfill for that.
Examples
import { SVResizeObserver } from 'scrollview-resize';
const el = document.querySelector('selector');
const observer = new SVResizeObserver(() => {
console.log('Scroll size changed');
});
observer.observe(el);