-
-
Save evert0n/89b067425a50214b7d2c227ba7ac88dd to your computer and use it in GitHub Desktop.
getComputedStyle shim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
computedStyle = function(el, prop) { | |
if (typeof getComputedStyle === 'function') { | |
return getComputedStyle(el)[prop]; | |
} else { | |
return el.currentStyle[prop]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment