Skip to content
/ raf Public

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

Notifications You must be signed in to change notification settings

micro-js/raf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published