mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Update comments about window.getComputedStyle in both locations.
This commit is contained in:
parent
3722aef8be
commit
dc3f7d3868
@ -278,7 +278,7 @@ jQuery.extend({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// NOTE: To any future maintainer, we've used both window.getComputedStyle
|
// NOTE: To any future maintainer, we've window.getComputedStyle
|
||||||
// because jsdom on node.js will break without it.
|
// because jsdom on node.js will break without it.
|
||||||
if ( window.getComputedStyle ) {
|
if ( window.getComputedStyle ) {
|
||||||
curCSS = function( elem, name ) {
|
curCSS = function( elem, name ) {
|
||||||
|
@ -214,10 +214,8 @@ jQuery.support = (function() {
|
|||||||
support.boxSizing = ( div.offsetWidth === 4 );
|
support.boxSizing = ( div.offsetWidth === 4 );
|
||||||
support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
|
support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
|
||||||
|
|
||||||
// NOTE: To any future maintainer, window.getComputedStyle was used here
|
// NOTE: To any future maintainer, we've window.getComputedStyle
|
||||||
// instead of getComputedStyle because it gave a better gzip size.
|
// because jsdom on node.js will break without it.
|
||||||
// The difference between window.getComputedStyle and getComputedStyle is
|
|
||||||
// 7 bytes
|
|
||||||
if ( window.getComputedStyle ) {
|
if ( window.getComputedStyle ) {
|
||||||
support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
|
support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
|
||||||
support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
|
support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
|
||||||
|
Loading…
Reference in New Issue
Block a user