mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 15:11:04 +00:00
22 lines
651 B
JavaScript
22 lines
651 B
JavaScript
/*!
|
|
{
|
|
"name": "requestAnimationFrame",
|
|
"property": "requestanimationframe",
|
|
"aliases": ["raf"],
|
|
"caniuse": "requestanimationframe",
|
|
"tags": ["animation"],
|
|
"authors": ["Addy Osmani"],
|
|
"notes": [{
|
|
"name": "W3C Spec",
|
|
"href": "https://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']});
|
|
});
|