first
This commit is contained in:
17
_core/opensrc/tool-man/css.js
Normal file
17
_core/opensrc/tool-man/css.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/* 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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user