Skip to content

Commit 453738a

Browse files
committed
Core: Change support.ownLast to support.ownFirst
jQuery.support.ownLast was the only support test that was supposed to be false when it succeeded. It was confusing. Fixes gh-2406 Closes gh-2408
1 parent a0a5c0b commit 453738a

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ jQuery.extend({
248248

249249
// Support: IE<9
250250
// Handle iteration over inherited properties before own properties.
251-
if ( support.ownLast ) {
251+
if ( !support.ownFirst ) {
252252
for ( key in obj ) {
253253
return hasOwn.call( obj, key );
254254
}

src/support.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var i;
1212
for ( i in jQuery( support ) ) {
1313
break;
1414
}
15-
support.ownLast = i !== "0";
15+
support.ownFirst = i === "0";
1616

1717
// Note: most support tests are defined in their respective modules.
1818

test/unit/support.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
9191
"opacity": true,
9292
"optDisabled": true,
9393
"optSelected": true,
94-
"ownLast": false,
94+
"ownFirst": true,
9595
"pixelMarginRight": true,
9696
"pixelPosition": true,
9797
"radioValue": true,
@@ -123,7 +123,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
123123
"opacity": true,
124124
"optDisabled": true,
125125
"optSelected": false,
126-
"ownLast": false,
126+
"ownFirst": true,
127127
"pixelMarginRight": true,
128128
"pixelPosition": true,
129129
"radioValue": false,
@@ -155,7 +155,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
155155
"opacity": true,
156156
"optDisabled": true,
157157
"optSelected": false,
158-
"ownLast": false,
158+
"ownFirst": true,
159159
"pixelMarginRight": true,
160160
"pixelPosition": true,
161161
"radioValue": false,
@@ -187,7 +187,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
187187
"opacity": false,
188188
"optDisabled": true,
189189
"optSelected": false,
190-
"ownLast": true,
190+
"ownFirst": false,
191191
"pixelMarginRight": true,
192192
"pixelPosition": false,
193193
"radioValue": false,
@@ -221,7 +221,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
221221
"opacity": true,
222222
"optDisabled": true,
223223
"optSelected": true,
224-
"ownLast": false,
224+
"ownFirst": true,
225225
"pixelMarginRight": true,
226226
"pixelPosition": true,
227227
"radioValue": true,
@@ -253,7 +253,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
253253
"opacity": true,
254254
"optDisabled": true,
255255
"optSelected": true,
256-
"ownLast": false,
256+
"ownFirst": true,
257257
"pixelMarginRight": true,
258258
"pixelPosition": false,
259259
"radioValue": true,
@@ -285,7 +285,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
285285
"opacity": true,
286286
"optDisabled": true,
287287
"optSelected": true,
288-
"ownLast": false,
288+
"ownFirst": true,
289289
"pixelMarginRight": true,
290290
"pixelPosition": false,
291291
"radioValue": true,
@@ -317,7 +317,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
317317
"opacity": true,
318318
"optDisabled": true,
319319
"optSelected": true,
320-
"ownLast": false,
320+
"ownFirst": true,
321321
"pixelMarginRight": true,
322322
"pixelPosition": true,
323323
"radioValue": true,
@@ -349,7 +349,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
349349
"opacity": true,
350350
"optDisabled": true,
351351
"optSelected": true,
352-
"ownLast": false,
352+
"ownFirst": true,
353353
"pixelMarginRight": true,
354354
"pixelPosition": false,
355355
"radioValue": true,
@@ -381,7 +381,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
381381
"opacity": true,
382382
"optDisabled": true,
383383
"optSelected": true,
384-
"ownLast": false,
384+
"ownFirst": true,
385385
"pixelMarginRight": true,
386386
"pixelPosition": false,
387387
"radioValue": true,
@@ -413,7 +413,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
413413
"opacity": true,
414414
"optDisabled": true,
415415
"optSelected": true,
416-
"ownLast": false,
416+
"ownFirst": true,
417417
"pixelMarginRight": false,
418418
"pixelPosition": false,
419419
"radioValue": true,
@@ -445,7 +445,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
445445
"opacity": true,
446446
"optDisabled": false,
447447
"optSelected": true,
448-
"ownLast": false,
448+
"ownFirst": true,
449449
"pixelMarginRight": true,
450450
"pixelPosition": false,
451451
"radioValue": true,

0 commit comments

Comments
 (0)