eventlistener-resize
v0.0.10
Published
A tiny library to add/remove listeners on Element resize
Downloads
6
Maintainers
Readme
eventlistener-resize
A tiny library to add/remove listeners on Element resize
Table of contents
Features
- Zero dependencies!
- Super tiny, at ~900B gzipped
Installation
npm install --save eventlistener-resize
Usage
import 'eventlistener-resize'
...
const element = document.querySelector('.el')
element.addEventListener('resizeStart', resizeStartEventCallback)
element.addEventListener('resize', resizeEventCallback)
element.addEventListener('resizeEnd', resizeEndEventCallback)
...
element.removeEventListener('resizeStart', resizeStartEventCallback)
element.removeEventListener('resize', resizeEventCallback)
element.removeEventListener('resizeEnd', resizeEndEventCallback)