Test
{"ScriptPreparationCode":" var myDiv = document.getElementById(\u0027myDiv\u0027);\r\n var $myDiv = $(myDiv);\r\nvar getStyle2;\r\n \r\n // getComputedStyle isn\u0027t compatible with all older browsers (notably IE),\r\n // so this is a wrapper function that works with those browsers.\r\n // From http://www.quirksmode.org/dom/getstyles.html\r\n function getStyle(el, styleProp) {\r\n if (el.currentStyle)\r\n var y = el.currentStyle[styleProp];\r\n else if (window.getComputedStyle)\r\n var y = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);\r\n return y;\r\n }\r\n\r\nif (window.getComputedStyle) {\r\n getStyle2 = window.getComputedStyle;\r\n} else {\r\n getStyle2 = function(el) {\r\n return el.currentStyle;\r\n }\r\n}","TestCases":[{"Name":"jQuery.css","Code":"var npaddingTop = $myDiv.css(\u0027padding-top\u0027);","IsDeferred":false},{"Name":"getComputedStyle()","Code":"var npaddingTop = getComputedStyle(myDiv).paddingTop;","IsDeferred":false},{"Name":"getStyle()","Code":"var npaddingTop = getStyle(myDiv, \u0027paddingTop\u0027);","IsDeferred":false},{"Name":"getStyle2()","Code":"var npaddingTop = getStyle2(myDiv)[\u0027paddingTop\u0027];","IsDeferred":false}]}