title: What are the issues with getting the vendor prefix for CSS Transitions using javascript?
body: <p>I'd like to not only detect transition support, but set the correct prefix with one function call. Would there be any clear issues with doing it this way?</p>
  
  <pre><code>function getTransitionPrefix() {
  var el = document.getElementsByTagName("body")[0],
  cssDec = (typeof window.getComputedStyle === "undefined") ?  {} : window.getComputedStyle(el,null),
  transition = typeof cssDec.WebkitTransition !== "undefined" ? "Webkit" : 
  typeof cssDec.MozTransition !== "undefined"  ? "Moz":
  typeof cssDec.msTransition !== "undefined" ? "ms" :
  typeof cssDec.OTransition !== "undefined" ? "O" : false;
  return transition;
  }
  </code></pre>