Dotclear

source: admin/js/tool-man/css.js @ 0:54703be25dd6

Revision 0:54703be25dd6, 528 bytes checked in by Dsls <dsls@…>, 14 years ago (diff)

2.3 branch (trunk) first checkin

Line 
1/* Copyright (c) 2005 Tim Taylor Consulting (see LICENSE.txt) */
2
3// TODO: write unit tests
4ToolMan._cssFactory = {
5     readStyle : function(element, property) {
6          if (element.style[property]) {
7               return element.style[property]
8          } else if (element.currentStyle) {
9               return element.currentStyle[property]
10          } else if (document.defaultView && document.defaultView.getComputedStyle) {
11               var style = document.defaultView.getComputedStyle(element, null)
12               return style.getPropertyValue(property)
13          } else {
14               return null
15          }
16     }
17}
Note: See TracBrowser for help on using the repository browser.

Sites map