@@ -465,7 +465,7 @@ const proxyHandler = {
465
465
const keys = new Set();
466
466
467
467
for (const key of target[impl][utils.supportedPropertyNames]) {
468
- if (! (key in target)) {
468
+ if (utils.isNamedPropertyVisible (key, target)) {
469
469
keys.add(\`\${key}\`);
470
470
}
471
471
}
@@ -482,7 +482,7 @@ const proxyHandler = {
482
482
}
483
483
let ignoreNamedProps = false;
484
484
485
- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
485
+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
486
486
const namedValue = target[impl][utils.namedGet](P);
487
487
488
488
return {
@@ -594,7 +594,7 @@ const proxyHandler = {
594
594
return Reflect.deleteProperty(target, P);
595
595
}
596
596
597
- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
597
+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
598
598
CEReactions.preSteps(globalObject);
599
599
try {
600
600
target[impl][utils.namedDelete](P);
@@ -3398,7 +3398,7 @@ const proxyHandler = {
3398
3398
const keys = new Set();
3399
3399
3400
3400
for (const key of target[impl][utils.supportedPropertyNames]) {
3401
- if (! (key in target)) {
3401
+ if (utils.isNamedPropertyVisible (key, target)) {
3402
3402
keys.add(\`\${key}\`);
3403
3403
}
3404
3404
}
@@ -3415,7 +3415,7 @@ const proxyHandler = {
3415
3415
}
3416
3416
let ignoreNamedProps = false;
3417
3417
3418
- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
3418
+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
3419
3419
const namedValue = target[impl].getItem(P);
3420
3420
3421
3421
return {
@@ -3507,7 +3507,7 @@ const proxyHandler = {
3507
3507
return Reflect.deleteProperty(target, P);
3508
3508
}
3509
3509
3510
- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
3510
+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
3511
3511
target[impl].removeItem(P);
3512
3512
return true;
3513
3513
}
@@ -5907,7 +5907,7 @@ const proxyHandler = {
5907
5907
}
5908
5908
5909
5909
for (const key of target[impl][utils.supportedPropertyNames]) {
5910
- if (! (key in target)) {
5910
+ if (utils.isNamedPropertyVisible (key, target)) {
5911
5911
keys.add(\`\${key}\`);
5912
5912
}
5913
5913
}
@@ -5940,7 +5940,7 @@ const proxyHandler = {
5940
5940
5941
5941
const namedValue = target[impl].namedItem(P);
5942
5942
5943
- if (namedValue !== null && !(P in target) && !ignoreNamedProps ) {
5943
+ if (!ignoreNamedProps && namedValue !== null && utils.isNamedPropertyVisible(P, target)) {
5944
5944
return {
5945
5945
writable: false,
5946
5946
enumerable: false,
@@ -6035,7 +6035,7 @@ const proxyHandler = {
6035
6035
return !(target[impl].item(index) !== undefined);
6036
6036
}
6037
6037
6038
- if (target[impl].namedItem(P) !== null && !(P in target)) {
6038
+ if (target[impl].namedItem(P) !== null && utils.isNamedPropertyVisible(P, target)) {
6039
6039
return false;
6040
6040
}
6041
6041
@@ -6219,7 +6219,7 @@ const proxyHandler = {
6219
6219
}
6220
6220
6221
6221
for (const key of target[impl][utils.supportedPropertyNames]) {
6222
- if (! (key in target)) {
6222
+ if (utils.isNamedPropertyVisible (key, target)) {
6223
6223
keys.add(\`\${key}\`);
6224
6224
}
6225
6225
}
@@ -6252,7 +6252,7 @@ const proxyHandler = {
6252
6252
6253
6253
const namedValue = target[impl].namedItem(P);
6254
6254
6255
- if (namedValue !== null && !(P in target) && !ignoreNamedProps ) {
6255
+ if (!ignoreNamedProps && namedValue !== null && utils.isNamedPropertyVisible(P, target)) {
6256
6256
return {
6257
6257
writable: true,
6258
6258
enumerable: true,
@@ -6376,7 +6376,7 @@ const proxyHandler = {
6376
6376
return !(target[impl].item(index) !== undefined);
6377
6377
}
6378
6378
6379
- if (target[impl].namedItem(P) !== null && !(P in target)) {
6379
+ if (target[impl].namedItem(P) !== null && utils.isNamedPropertyVisible(P, target)) {
6380
6380
return false;
6381
6381
}
6382
6382
@@ -6947,7 +6947,7 @@ const proxyHandler = {
6947
6947
const keys = new Set();
6948
6948
6949
6949
for (const key of target[impl][utils.supportedPropertyNames]) {
6950
- if (! (key in target)) {
6950
+ if (utils.isNamedPropertyVisible (key, target)) {
6951
6951
keys.add(\`\${key}\`);
6952
6952
}
6953
6953
}
@@ -6964,7 +6964,7 @@ const proxyHandler = {
6964
6964
}
6965
6965
let ignoreNamedProps = false;
6966
6966
6967
- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
6967
+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
6968
6968
const namedValue = target[impl][utils.namedGet](P);
6969
6969
6970
6970
return {
@@ -7068,7 +7068,7 @@ const proxyHandler = {
7068
7068
return Reflect.deleteProperty(target, P);
7069
7069
}
7070
7070
7071
- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
7071
+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
7072
7072
return false;
7073
7073
}
7074
7074
@@ -7646,7 +7646,7 @@ exports.install = function install(globalObject) {
7646
7646
return Reflect.getOwnPropertyDescriptor(target, P);
7647
7647
}
7648
7648
7649
- if (object[impl][utils.supportsPropertyName](P) && !(P in object)) {
7649
+ if (object[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, object)) {
7650
7650
const namedValue = object[impl][utils.namedGet](P);
7651
7651
7652
7652
return {
@@ -7678,6 +7678,7 @@ exports.install = function install(globalObject) {
7678
7678
}
7679
7679
);
7680
7680
7681
+ utils.registerNamedPropertiesObject(NamedPropertiesObject);
7681
7682
Object.setPrototypeOf(Window.prototype, NamedPropertiesObject);
7682
7683
7683
7684
if (globalObject[ctorRegistry] === undefined) {
@@ -8256,7 +8257,7 @@ const proxyHandler = {
8256
8257
const keys = new Set();
8257
8258
8258
8259
for (const key of target[impl][utils.supportedPropertyNames]) {
8259
- if (! (key in target)) {
8260
+ if (utils.isNamedPropertyVisible (key, target)) {
8260
8261
keys.add(\`\${key}\`);
8261
8262
}
8262
8263
}
@@ -8273,7 +8274,7 @@ const proxyHandler = {
8273
8274
}
8274
8275
let ignoreNamedProps = false;
8275
8276
8276
- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
8277
+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
8277
8278
const namedValue = target[impl][utils.namedGet](P);
8278
8279
8279
8280
return {
@@ -8375,7 +8376,7 @@ const proxyHandler = {
8375
8376
return Reflect.deleteProperty(target, P);
8376
8377
}
8377
8378
8378
- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
8379
+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
8379
8380
target[impl][utils.namedDelete](P);
8380
8381
return true;
8381
8382
}
@@ -11173,7 +11174,7 @@ const proxyHandler = {
11173
11174
const keys = new Set();
11174
11175
11175
11176
for (const key of target[impl][utils.supportedPropertyNames]) {
11176
- if (! (key in target)) {
11177
+ if (utils.isNamedPropertyVisible (key, target)) {
11177
11178
keys.add(\`\${key}\`);
11178
11179
}
11179
11180
}
@@ -11190,7 +11191,7 @@ const proxyHandler = {
11190
11191
}
11191
11192
let ignoreNamedProps = false;
11192
11193
11193
- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
11194
+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
11194
11195
const namedValue = target[impl].getItem(P);
11195
11196
11196
11197
return {
@@ -11282,7 +11283,7 @@ const proxyHandler = {
11282
11283
return Reflect.deleteProperty(target, P);
11283
11284
}
11284
11285
11285
- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
11286
+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
11286
11287
target[impl].removeItem(P);
11287
11288
return true;
11288
11289
}
@@ -13682,7 +13683,7 @@ const proxyHandler = {
13682
13683
}
13683
13684
13684
13685
for (const key of target[impl][utils.supportedPropertyNames]) {
13685
- if (! (key in target)) {
13686
+ if (utils.isNamedPropertyVisible (key, target)) {
13686
13687
keys.add(\`\${key}\`);
13687
13688
}
13688
13689
}
@@ -13715,7 +13716,7 @@ const proxyHandler = {
13715
13716
13716
13717
const namedValue = target[impl].namedItem(P);
13717
13718
13718
- if (namedValue !== null && !(P in target) && !ignoreNamedProps ) {
13719
+ if (!ignoreNamedProps && namedValue !== null && utils.isNamedPropertyVisible(P, target)) {
13719
13720
return {
13720
13721
writable: false,
13721
13722
enumerable: false,
@@ -13810,7 +13811,7 @@ const proxyHandler = {
13810
13811
return !(target[impl].item(index) !== undefined);
13811
13812
}
13812
13813
13813
- if (target[impl].namedItem(P) !== null && !(P in target)) {
13814
+ if (target[impl].namedItem(P) !== null && utils.isNamedPropertyVisible(P, target)) {
13814
13815
return false;
13815
13816
}
13816
13817
@@ -13994,7 +13995,7 @@ const proxyHandler = {
13994
13995
}
13995
13996
13996
13997
for (const key of target[impl][utils.supportedPropertyNames]) {
13997
- if (! (key in target)) {
13998
+ if (utils.isNamedPropertyVisible (key, target)) {
13998
13999
keys.add(\`\${key}\`);
13999
14000
}
14000
14001
}
@@ -14027,7 +14028,7 @@ const proxyHandler = {
14027
14028
14028
14029
const namedValue = target[impl].namedItem(P);
14029
14030
14030
- if (namedValue !== null && !(P in target) && !ignoreNamedProps ) {
14031
+ if (!ignoreNamedProps && namedValue !== null && utils.isNamedPropertyVisible(P, target)) {
14031
14032
return {
14032
14033
writable: true,
14033
14034
enumerable: true,
@@ -14151,7 +14152,7 @@ const proxyHandler = {
14151
14152
return !(target[impl].item(index) !== undefined);
14152
14153
}
14153
14154
14154
- if (target[impl].namedItem(P) !== null && !(P in target)) {
14155
+ if (target[impl].namedItem(P) !== null && utils.isNamedPropertyVisible(P, target)) {
14155
14156
return false;
14156
14157
}
14157
14158
@@ -14722,7 +14723,7 @@ const proxyHandler = {
14722
14723
const keys = new Set();
14723
14724
14724
14725
for (const key of target[impl][utils.supportedPropertyNames]) {
14725
- if (! (key in target)) {
14726
+ if (utils.isNamedPropertyVisible (key, target)) {
14726
14727
keys.add(\`\${key}\`);
14727
14728
}
14728
14729
}
@@ -14739,7 +14740,7 @@ const proxyHandler = {
14739
14740
}
14740
14741
let ignoreNamedProps = false;
14741
14742
14742
- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
14743
+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
14743
14744
const namedValue = target[impl][utils.namedGet](P);
14744
14745
14745
14746
return {
@@ -14843,7 +14844,7 @@ const proxyHandler = {
14843
14844
return Reflect.deleteProperty(target, P);
14844
14845
}
14845
14846
14846
- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
14847
+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
14847
14848
return false;
14848
14849
}
14849
14850
@@ -15421,7 +15422,7 @@ exports.install = function install(globalObject) {
15421
15422
return Reflect.getOwnPropertyDescriptor(target, P);
15422
15423
}
15423
15424
15424
- if (object[impl][utils.supportsPropertyName](P) && !(P in object)) {
15425
+ if (object[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, object)) {
15425
15426
const namedValue = object[impl][utils.namedGet](P);
15426
15427
15427
15428
return {
@@ -15453,6 +15454,7 @@ exports.install = function install(globalObject) {
15453
15454
}
15454
15455
);
15455
15456
15457
+ utils.registerNamedPropertiesObject(NamedPropertiesObject);
15456
15458
Object.setPrototypeOf(Window.prototype, NamedPropertiesObject);
15457
15459
15458
15460
if (globalObject[ctorRegistry] === undefined) {
0 commit comments