(elem: Element, propertyName: string)
| 88 | } |
| 89 | |
| 90 | function getEffectiveStyle(elem: Element, propertyName: string): string | null { |
| 91 | var computed = computedStyleCache.get(elem); |
| 92 | if (computed === undefined) { |
| 93 | var win = elem.ownerDocument.defaultView; |
| 94 | computed = win ? (win.getComputedStyle(elem) || null) : null; |
| 95 | computedStyleCache.set(elem, computed); |
| 96 | } |
| 97 | if (!computed) { |
| 98 | return null; |
| 99 | } |
| 100 | var value = computed.getPropertyValue(propertyName); |
| 101 | return value || null; |
| 102 | } |
| 103 | |
| 104 | function getOpacity(elem: Element): number { |
| 105 | var opacityStyle = getEffectiveStyle(elem, 'opacity'); |
no test coverage detected