* Function: ng_GetCurrentStyle * Gets current (computed) style of element. * * Syntax: * string *ng_GetCurrentStyle* (object elm, string style) * * Parameters: * elm - object element * style - name of the style, for example 'margin-right' * * Returns: * Value o
(o,s)
| 1631 | * |
| 1632 | */ |
| 1633 | function ng_GetCurrentStyle(o,s) |
| 1634 | { |
| 1635 | var val; |
| 1636 | if(document.defaultView && document.defaultView.getComputedStyle) |
| 1637 | { |
| 1638 | var cstyle=document.defaultView.getComputedStyle(o, ''); |
| 1639 | if(cstyle) val = cstyle.getPropertyValue(s); |
| 1640 | } |
| 1641 | else if(o.currentStyle) |
| 1642 | { |
| 1643 | s = s.replace(/\-(\w)/g, function (s, p){ return p.toUpperCase(); }); |
| 1644 | val = o.currentStyle[s]; |
| 1645 | } |
| 1646 | return val; |
| 1647 | } |
| 1648 | |
| 1649 | /** |
| 1650 | * Function: ng_BeginMeasureElement |
no outgoing calls
no test coverage detected