face-animation-frame

Support fucking weapp and old browsers

Usage no npm install needed!

<script type="module">
  import faceAnimationFrame from 'https://cdn.skypack.dev/face-animation-frame';
</script>

README

face-animation-frame

polyfill

<script src="https://unpkg.com/face-animation-frame"></script>
<script>
var some = requestAnimationFrame(function () {
    console.log("do something")
})
cancelAnimationFrame(some)
</script>

npm

require('face-animation-frame')
var some = requestAnimationFrame(function () {
    console.log("do something")
})
cancelAnimationFrame(some)

fucking-weapp

🖕 weapp

var animationFrame = require('face-animation-frame')
var some = animationFrame.request(function () {
    console.log("do something")
})
animationFrame.cancel(some)