element animate throttle
This library is an plugin for HTML element animate, it will provide a
animateThrottle method, and you can call it everytime, it will auto
throttle by previous animation finish.
Why use this?
Since we could apply the same keyframe again and agian, but it you don't want to see the bounce of the animation occurs, we should check the animation state is
pause, or you need to implement a
throttle function to prevent the animate bounce.
$ yarn add element-animate-throttle
elementAnimateThrottle function will plug the
animateThrottle method in element you passed in, it will not influence all element prototype.
;const el = document;;el; // sane as the el.animate
Apply all element (If you really want)
;;const el = document;// Even it render after you call elementAnimateThrottle// el will inherit from Element.prototypeel;
MIT © 2019 realdennis