Commit 5b036936 authored by louisremi's avatar louisremi Committed by timmywil

shorten requestAnimationFrame test

parent c95ab2a3
......@@ -13,7 +13,8 @@
a = div.getElementsByTagName("a")[0],
select = document.createElement("select"),
opt = select.appendChild( document.createElement("option") ),
input = div.getElementsByTagName("input")[0];
input = div.getElementsByTagName("input")[0],
raf = "RequestAnimationFrame";
// Can't get basic test support
if ( !all || !all.length || !a ) {
......@@ -60,10 +61,9 @@
// Verify requestAnimationFrame mechanism existence
// use the prefixed name as the value
requestAnimationFrame: window.mozRequestAnimationFrame ?
'mozRequestAnimationFrame' :
window.webkitRequestAnimationFrame ?
'webkitRequestAnimationFrame' :
requestAnimationFrame:
window['moz' + raf] ? 'moz' + raf :
window['webkit' + raf] ? 'webkit' + raf :
false,
// Will be defined later
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment