@f/raf

1.0.3 • Public • Published

raf

Build status Git tag NPM version Code style

Request animation frame (polyfilled if it doesn't exist)

Installation

$ npm install @f/raf

Usage

var raf = require('@f/raf')

raf(function () {
  element.scrollIntoView()
})

API

raf(fn)

  • fn - The function to be executed on the next animation frame

Returns: An integer id. Pass this to raf.cancel(id) if you want to cancel the frame before it happens.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    16,547
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    16,547
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @f/raf

Weekly Downloads

16,547

Version

1.0.3

License

MIT

Last publish

Collaborators

  • f