[webkit-help] Help with feature set

Jeffry Killen jekillen at prodigy.net
Tue Mar 26 23:51:02 PDT 2013


I am working on getting acquainted with css3/html5/javascript/canvas/ 
webGL.

I have noticed that running a script that detects what version of  
requestAnimationFrame
the requesting client is using, that defaults to setTImeout, the  
Safari versions I am using
does not seem to recognize any version of requestAnimationFrame:

var src = '' var strSrc = '';
var alt = function()
{
            if(window.requestAnimationFrame)
             {
              src = window.requestAnimationFrame;
             strSrc = 'requestAnimationFrame'; return src;
              }
      if(window.webkitRequestAnimationFrame)
         {
          src = window.webkitRequestAnimationFrame; // Safari Version  
5.1.8 (6534.58.2)
          strSrc = 'webkitRequestAnimationFrame';
          return src;
         }
       if(window.mozRequestAnimationFrame)
         {
          src = window.mozRequestAnimationFrame;
          strSrc = 'mozRequestAnimationFrame';
          return src;
         }
       if(window.oRequestAnimationFrame)
         {
          src = window.oRequestAnimationFrame;
          strSrc = 'oRequestAnimationFrame';
          return src;
         }
       if(window.msRequestAnimationFrame)
         {
          src = window.msRequestAnimationFrame;
          strSrc = 'msRequestAnimationFrame';
          return src;
         }
       else
         {
          strSrc = 'setTimeout';
          return function(callBack)
             {
              window.setTimeout(callBack, 1000/60);
             }
         }
      }
window.onload = function() {  window.requestAnimFrame =  
alt();          if(window.requestAnimFrame) { alert(strSrc) } // alert  
-> for Safari 'setTimeout'

In Safari I get the alert string 'setTimeout' instead of  
'webkitRequestAnimationFrame'. I am using two different versions of  
Safari on Mac OSX. I don't see any misspellings here. Has Safari  
discontinued this function? Or, am I doing something wrong? Thanks for  
time and attention.

There is also missing the -webkit-gradient
How can I determine the actual feature set, and the correct syntax for  
any particular version of Safari (or Chrome, for that matter?)
Thanks for time and attention
Frustrated


More information about the webkit-help mailing list