longest-transition
Cross-browser longest transition getter.
This module reads all transitions of an element and provides the longest one.
;// orconst longestTransition = windowlongestTransition; const element = document; const time = ;/* `time` will be something like: { property: 'height', duration: 200, delay: 100 } Note that time is in milliseconds*/
Installation
$ npm install longest-transition
Usage
element
: The element that is transitioning.- Returns an object in the format below.
property: 'height' duration: 200 // milliseconds delay: 100 // milliseconds
Tests
$ npm test
$ npm test-cov
to get coverage report
License
Released under the MIT License.