Miss any of our Open RFC calls?Watch the recordings here! »

eventlistener-resize

0.0.10 • Public • Published

eventlistener-resize

Build Status npm version

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)

Install

npm i eventlistener-resize

DownloadsWeekly Downloads

0

Version

0.0.10

License

MIT

Unpacked Size

9.85 kB

Total Files

11

Last publish

Collaborators

  • avatar