Skip to content

Commit dc3f7d3

Browse files
committed
Update comments about window.getComputedStyle in both locations.
1 parent 3722aef commit dc3f7d3

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ jQuery.extend({
278278
}
279279
});
280280

281-
// NOTE: To any future maintainer, we've used both window.getComputedStyle
281+
// NOTE: To any future maintainer, we've window.getComputedStyle
282282
// because jsdom on node.js will break without it.
283283
if ( window.getComputedStyle ) {
284284
curCSS = function( elem, name ) {

src/support.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,8 @@ jQuery.support = (function() {
214214
support.boxSizing = ( div.offsetWidth === 4 );
215215
support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
216216

217-
// NOTE: To any future maintainer, window.getComputedStyle was used here
218-
// instead of getComputedStyle because it gave a better gzip size.
219-
// The difference between window.getComputedStyle and getComputedStyle is
220-
// 7 bytes
217+
// NOTE: To any future maintainer, we've window.getComputedStyle
218+
// because jsdom on node.js will break without it.
221219
if ( window.getComputedStyle ) {
222220
support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
223221
support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";

0 commit comments

Comments
 (0)