Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix old ff #20

Merged
merged 2 commits into from

2 participants

@arian

Fixes older FireFoxes.

@kamicane kamicane merged commit ab7266b into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 21, 2013
  1. @arian
  2. @arian

    Fixing old FF which doesn't have requestAnimationFrame

    arian authored
    So it's using setTimeout, and FF passes some value into the setTimeout callback
    (See mootools/mootools-core@3abda41).
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +1 −1  lib/browser.js
  2. +3 −1 lib/frame.js
View
2  lib/browser.js
@@ -40,7 +40,7 @@ var round = function(n){
// compute > node > property
var compute = global.getComputedStyle ? function(node){
- var cts = getComputedStyle(node)
+ var cts = getComputedStyle(node, null)
return function(property){
return cts ? cts.getPropertyValue(hyphenate(property)) : ""
}
View
4 lib/frame.js
@@ -10,7 +10,9 @@ var requestFrame = global.requestAnimationFrame ||
global.oRequestAnimationFrame ||
global.msRequestAnimationFrame ||
function(callback){
- return setTimeout(callback, 1e3 / 60)
+ return setTimeout(function(){
+ callback()
+ }, 1e3 / 60)
}
var callbacks = []
Something went wrong with that request. Please try again.