UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

24 lines (21 loc) 656 B
/*! { "name": "requestAnimationFrame", "property": "requestanimationframe", "aliases": ["raf"], "caniuse": "requestanimationframe", "tags": ["animation"], "authors": ["Addy Osmani"], "notes": [{ "name": "W3C spec", "href": "http://www.w3.org/TR/animation-timing/" }], "polyfills": ["raf"] } !*/ /* DOC Detects support for the `window.requestAnimationFrame` API, for offloading animation repainting to the browser for optimized performance. */ define(['Modernizr', 'prefixed'], function( Modernizr, prefixed ) { Modernizr.addTest('requestanimationframe', !!prefixed('requestAnimationFrame', window), { aliases: ['raf'] }); });