supportsTransitionTest

JavaScript performance comparison

Test case created

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
ver1
var supportsTransitions = (function() {
  var v = ['ms', 'Khtml', 'O', 'Moz', 'Webkit', ''];
  while (v.length) {
    if (v.pop() + 'Transition' in document.body.style) {
      return true;
    }
  }
  return false;
})();
pending…
ver2
var supportsTransitions = (function(style) {
  var prefixes = ['ms', 'Khtml', 'O', 'Moz', 'Webkit', ''];
  for (var i = 0, l = prefixes.length; i < l; i++) {
    if (typeof style[prefixes[i] + 'Transition'] !== 'undefined') {
      return true;
    }
  }
  return false;
})(document.createElement('div').style);
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment