shorten requestAnimationFrame test
This commit is contained in:
parent
c95ab2a39c
commit
5b0369366a
|
@ -13,7 +13,8 @@
|
||||||
a = div.getElementsByTagName("a")[0],
|
a = div.getElementsByTagName("a")[0],
|
||||||
select = document.createElement("select"),
|
select = document.createElement("select"),
|
||||||
opt = select.appendChild( document.createElement("option") ),
|
opt = select.appendChild( document.createElement("option") ),
|
||||||
input = div.getElementsByTagName("input")[0];
|
input = div.getElementsByTagName("input")[0],
|
||||||
|
raf = "RequestAnimationFrame";
|
||||||
|
|
||||||
// Can't get basic test support
|
// Can't get basic test support
|
||||||
if ( !all || !all.length || !a ) {
|
if ( !all || !all.length || !a ) {
|
||||||
|
@ -60,11 +61,10 @@
|
||||||
|
|
||||||
// Verify requestAnimationFrame mechanism existence
|
// Verify requestAnimationFrame mechanism existence
|
||||||
// use the prefixed name as the value
|
// use the prefixed name as the value
|
||||||
requestAnimationFrame: window.mozRequestAnimationFrame ?
|
requestAnimationFrame:
|
||||||
'mozRequestAnimationFrame' :
|
window['moz' + raf] ? 'moz' + raf :
|
||||||
window.webkitRequestAnimationFrame ?
|
window['webkit' + raf] ? 'webkit' + raf :
|
||||||
'webkitRequestAnimationFrame' :
|
false,
|
||||||
false,
|
|
||||||
|
|
||||||
// Will be defined later
|
// Will be defined later
|
||||||
deleteExpando: true,
|
deleteExpando: true,
|
||||||
|
|
Loading…
Reference in a new issue