Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1x 1x 1x 1x | export function getStyleValue(element, strCssRule) { //https://stackoverflow.com/questions/5227909/how-to-get-an-elements-padding-value-using-javascript let strValue = ""; Eif (document.defaultView && document.defaultView.getComputedStyle) { strValue = document.defaultView.getComputedStyle(element, "").getPropertyValue(strCssRule); } else if (element.currentStyle) { strCssRule = strCssRule.replace(/(\w)/g, function (strMatch, p1) { return p1.toUpperCase(); }); strValue = element.currentStyle[strCssRule]; } return strValue; } |