scrollview-resize
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Scrollview Resize

Report changes to the dimensions of an Element's scrollWidth and scrollHeight

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);

License

MIT

Package Sidebar

Install

npm i scrollview-resize

Weekly Downloads

14

Version

1.0.2

License

MIT

Unpacked Size

9.93 kB

Total Files

8

Last publish

Collaborators

  • xiejay