Skip to content

Commit

Permalink
Update comments about window.getComputedStyle in both locations.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Aug 11, 2012
1 parent 3722aef commit dc3f7d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/css.js
Expand Up @@ -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

This comment has been minimized.

Copy link
@enumag

enumag Aug 11, 2012

This should be "we've used", shouldn't it?

This comment has been minimized.

Copy link
@rwaldron

rwaldron Aug 11, 2012

Author Member

Ugh. Yes. I'll fix it later. Thankfully this won't "break the build"

// because jsdom on node.js will break without it.
if ( window.getComputedStyle ) {
curCSS = function( elem, name ) {
Expand Down
6 changes: 2 additions & 4 deletions src/support.js
Expand Up @@ -214,10 +214,8 @@ jQuery.support = (function() {
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
// NOTE: To any future maintainer, we've window.getComputedStyle
// because jsdom on node.js will break without it.
if ( window.getComputedStyle ) {
support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
Expand Down

0 comments on commit dc3f7d3

Please sign in to comment.