topical media & game development

talk show tell print

lib-js-tool-man-source-org-tool-man-css.js / js



  /* Copyright (c) 2005 Tim Taylor Consulting (see LICENSE.txt) */
  
  // TODO: write unit tests
  ToolMan._cssFactory = {
          readStyle : function(element, property) {
                  if (element.style[property]) {
                          return element.style[property]
                  } else if (element.currentStyle) {
                          return element.currentStyle[property]
                  } else if (document.defaultView && document.defaultView.getComputedStyle) {
                          var style = document.defaultView.getComputedStyle(element, null)
                          return style.getPropertyValue(property)
                  } else {
                          return null
                  }
          }
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.