diff options
Diffstat (limited to 'src/support.js')
-rw-r--r-- | src/support.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/support.js b/src/support.js index 06170a39b..334175ff6 100644 --- a/src/support.js +++ b/src/support.js @@ -210,6 +210,11 @@ jQuery.support = (function() { div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; support.boxSizing = ( div.offsetWidth === 4 ); support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); + + // NOTE: To any future maintainer, window.getComputedStyle was used here + // instead of getComputedStyle because it gave a better gzip size. + // The difference between window.getComputedStyle and getComputedStyle is + // 7 bytes if ( window.getComputedStyle ) { support.pixelMargin = ( window.getComputedStyle( div, null ) || {} ).marginTop !== "1%"; support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; |