@@ -465,7 +465,7 @@ const proxyHandler = {
465465 const keys = new Set();
466466
467467 for (const key of target[impl][utils.supportedPropertyNames]) {
468- if (! (key in target)) {
468+ if (utils.isNamedPropertyVisible (key, target)) {
469469 keys.add(\`\${key}\`);
470470 }
471471 }
@@ -482,7 +482,7 @@ const proxyHandler = {
482482 }
483483 let ignoreNamedProps = false;
484484
485- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
485+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
486486 const namedValue = target[impl][utils.namedGet](P);
487487
488488 return {
@@ -594,7 +594,7 @@ const proxyHandler = {
594594 return Reflect.deleteProperty(target, P);
595595 }
596596
597- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
597+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
598598 CEReactions.preSteps(globalObject);
599599 try {
600600 target[impl][utils.namedDelete](P);
@@ -3398,7 +3398,7 @@ const proxyHandler = {
33983398 const keys = new Set();
33993399
34003400 for (const key of target[impl][utils.supportedPropertyNames]) {
3401- if (! (key in target)) {
3401+ if (utils.isNamedPropertyVisible (key, target)) {
34023402 keys.add(\`\${key}\`);
34033403 }
34043404 }
@@ -3415,7 +3415,7 @@ const proxyHandler = {
34153415 }
34163416 let ignoreNamedProps = false;
34173417
3418- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
3418+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
34193419 const namedValue = target[impl].getItem(P);
34203420
34213421 return {
@@ -3507,7 +3507,7 @@ const proxyHandler = {
35073507 return Reflect.deleteProperty(target, P);
35083508 }
35093509
3510- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
3510+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
35113511 target[impl].removeItem(P);
35123512 return true;
35133513 }
@@ -5907,7 +5907,7 @@ const proxyHandler = {
59075907 }
59085908
59095909 for (const key of target[impl][utils.supportedPropertyNames]) {
5910- if (! (key in target)) {
5910+ if (utils.isNamedPropertyVisible (key, target)) {
59115911 keys.add(\`\${key}\`);
59125912 }
59135913 }
@@ -5940,7 +5940,7 @@ const proxyHandler = {
59405940
59415941 const namedValue = target[impl].namedItem(P);
59425942
5943- if (namedValue !== null && !(P in target) && !ignoreNamedProps ) {
5943+ if (!ignoreNamedProps && namedValue !== null && utils.isNamedPropertyVisible(P, target)) {
59445944 return {
59455945 writable: false,
59465946 enumerable: false,
@@ -6035,7 +6035,7 @@ const proxyHandler = {
60356035 return !(target[impl].item(index) !== undefined);
60366036 }
60376037
6038- if (target[impl].namedItem(P) !== null && !(P in target)) {
6038+ if (target[impl].namedItem(P) !== null && utils.isNamedPropertyVisible(P, target)) {
60396039 return false;
60406040 }
60416041
@@ -6219,7 +6219,7 @@ const proxyHandler = {
62196219 }
62206220
62216221 for (const key of target[impl][utils.supportedPropertyNames]) {
6222- if (! (key in target)) {
6222+ if (utils.isNamedPropertyVisible (key, target)) {
62236223 keys.add(\`\${key}\`);
62246224 }
62256225 }
@@ -6252,7 +6252,7 @@ const proxyHandler = {
62526252
62536253 const namedValue = target[impl].namedItem(P);
62546254
6255- if (namedValue !== null && !(P in target) && !ignoreNamedProps ) {
6255+ if (!ignoreNamedProps && namedValue !== null && utils.isNamedPropertyVisible(P, target)) {
62566256 return {
62576257 writable: true,
62586258 enumerable: true,
@@ -6376,7 +6376,7 @@ const proxyHandler = {
63766376 return !(target[impl].item(index) !== undefined);
63776377 }
63786378
6379- if (target[impl].namedItem(P) !== null && !(P in target)) {
6379+ if (target[impl].namedItem(P) !== null && utils.isNamedPropertyVisible(P, target)) {
63806380 return false;
63816381 }
63826382
@@ -6947,7 +6947,7 @@ const proxyHandler = {
69476947 const keys = new Set();
69486948
69496949 for (const key of target[impl][utils.supportedPropertyNames]) {
6950- if (! (key in target)) {
6950+ if (utils.isNamedPropertyVisible (key, target)) {
69516951 keys.add(\`\${key}\`);
69526952 }
69536953 }
@@ -6964,7 +6964,7 @@ const proxyHandler = {
69646964 }
69656965 let ignoreNamedProps = false;
69666966
6967- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
6967+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
69686968 const namedValue = target[impl][utils.namedGet](P);
69696969
69706970 return {
@@ -7068,7 +7068,7 @@ const proxyHandler = {
70687068 return Reflect.deleteProperty(target, P);
70697069 }
70707070
7071- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
7071+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
70727072 return false;
70737073 }
70747074
@@ -7646,7 +7646,7 @@ exports.install = function install(globalObject) {
76467646 return Reflect.getOwnPropertyDescriptor(target, P);
76477647 }
76487648
7649- if (object[impl][utils.supportsPropertyName](P) && !(P in object)) {
7649+ if (object[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, object)) {
76507650 const namedValue = object[impl][utils.namedGet](P);
76517651
76527652 return {
@@ -7678,6 +7678,7 @@ exports.install = function install(globalObject) {
76787678 }
76797679 );
76807680
7681+ utils.registerNamedPropertiesObject(NamedPropertiesObject);
76817682 Object.setPrototypeOf(Window.prototype, NamedPropertiesObject);
76827683
76837684 if (globalObject[ctorRegistry] === undefined) {
@@ -8256,7 +8257,7 @@ const proxyHandler = {
82568257 const keys = new Set();
82578258
82588259 for (const key of target[impl][utils.supportedPropertyNames]) {
8259- if (! (key in target)) {
8260+ if (utils.isNamedPropertyVisible (key, target)) {
82608261 keys.add(\`\${key}\`);
82618262 }
82628263 }
@@ -8273,7 +8274,7 @@ const proxyHandler = {
82738274 }
82748275 let ignoreNamedProps = false;
82758276
8276- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
8277+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
82778278 const namedValue = target[impl][utils.namedGet](P);
82788279
82798280 return {
@@ -8375,7 +8376,7 @@ const proxyHandler = {
83758376 return Reflect.deleteProperty(target, P);
83768377 }
83778378
8378- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
8379+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
83798380 target[impl][utils.namedDelete](P);
83808381 return true;
83818382 }
@@ -11173,7 +11174,7 @@ const proxyHandler = {
1117311174 const keys = new Set();
1117411175
1117511176 for (const key of target[impl][utils.supportedPropertyNames]) {
11176- if (! (key in target)) {
11177+ if (utils.isNamedPropertyVisible (key, target)) {
1117711178 keys.add(\`\${key}\`);
1117811179 }
1117911180 }
@@ -11190,7 +11191,7 @@ const proxyHandler = {
1119011191 }
1119111192 let ignoreNamedProps = false;
1119211193
11193- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
11194+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
1119411195 const namedValue = target[impl].getItem(P);
1119511196
1119611197 return {
@@ -11282,7 +11283,7 @@ const proxyHandler = {
1128211283 return Reflect.deleteProperty(target, P);
1128311284 }
1128411285
11285- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
11286+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
1128611287 target[impl].removeItem(P);
1128711288 return true;
1128811289 }
@@ -13682,7 +13683,7 @@ const proxyHandler = {
1368213683 }
1368313684
1368413685 for (const key of target[impl][utils.supportedPropertyNames]) {
13685- if (! (key in target)) {
13686+ if (utils.isNamedPropertyVisible (key, target)) {
1368613687 keys.add(\`\${key}\`);
1368713688 }
1368813689 }
@@ -13715,7 +13716,7 @@ const proxyHandler = {
1371513716
1371613717 const namedValue = target[impl].namedItem(P);
1371713718
13718- if (namedValue !== null && !(P in target) && !ignoreNamedProps ) {
13719+ if (!ignoreNamedProps && namedValue !== null && utils.isNamedPropertyVisible(P, target)) {
1371913720 return {
1372013721 writable: false,
1372113722 enumerable: false,
@@ -13810,7 +13811,7 @@ const proxyHandler = {
1381013811 return !(target[impl].item(index) !== undefined);
1381113812 }
1381213813
13813- if (target[impl].namedItem(P) !== null && !(P in target)) {
13814+ if (target[impl].namedItem(P) !== null && utils.isNamedPropertyVisible(P, target)) {
1381413815 return false;
1381513816 }
1381613817
@@ -13994,7 +13995,7 @@ const proxyHandler = {
1399413995 }
1399513996
1399613997 for (const key of target[impl][utils.supportedPropertyNames]) {
13997- if (! (key in target)) {
13998+ if (utils.isNamedPropertyVisible (key, target)) {
1399813999 keys.add(\`\${key}\`);
1399914000 }
1400014001 }
@@ -14027,7 +14028,7 @@ const proxyHandler = {
1402714028
1402814029 const namedValue = target[impl].namedItem(P);
1402914030
14030- if (namedValue !== null && !(P in target) && !ignoreNamedProps ) {
14031+ if (!ignoreNamedProps && namedValue !== null && utils.isNamedPropertyVisible(P, target)) {
1403114032 return {
1403214033 writable: true,
1403314034 enumerable: true,
@@ -14151,7 +14152,7 @@ const proxyHandler = {
1415114152 return !(target[impl].item(index) !== undefined);
1415214153 }
1415314154
14154- if (target[impl].namedItem(P) !== null && !(P in target)) {
14155+ if (target[impl].namedItem(P) !== null && utils.isNamedPropertyVisible(P, target)) {
1415514156 return false;
1415614157 }
1415714158
@@ -14722,7 +14723,7 @@ const proxyHandler = {
1472214723 const keys = new Set();
1472314724
1472414725 for (const key of target[impl][utils.supportedPropertyNames]) {
14725- if (! (key in target)) {
14726+ if (utils.isNamedPropertyVisible (key, target)) {
1472614727 keys.add(\`\${key}\`);
1472714728 }
1472814729 }
@@ -14739,7 +14740,7 @@ const proxyHandler = {
1473914740 }
1474014741 let ignoreNamedProps = false;
1474114742
14742- if (target[impl][utils.supportsPropertyName](P) && !(P in target) && !ignoreNamedProps ) {
14743+ if (!ignoreNamedProps && target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
1474314744 const namedValue = target[impl][utils.namedGet](P);
1474414745
1474514746 return {
@@ -14843,7 +14844,7 @@ const proxyHandler = {
1484314844 return Reflect.deleteProperty(target, P);
1484414845 }
1484514846
14846- if (target[impl][utils.supportsPropertyName](P) && !(P in target)) {
14847+ if (target[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, target)) {
1484714848 return false;
1484814849 }
1484914850
@@ -15421,7 +15422,7 @@ exports.install = function install(globalObject) {
1542115422 return Reflect.getOwnPropertyDescriptor(target, P);
1542215423 }
1542315424
15424- if (object[impl][utils.supportsPropertyName](P) && !(P in object)) {
15425+ if (object[impl][utils.supportsPropertyName](P) && utils.isNamedPropertyVisible(P, object)) {
1542515426 const namedValue = object[impl][utils.namedGet](P);
1542615427
1542715428 return {
@@ -15453,6 +15454,7 @@ exports.install = function install(globalObject) {
1545315454 }
1545415455 );
1545515456
15457+ utils.registerNamedPropertiesObject(NamedPropertiesObject);
1545615458 Object.setPrototypeOf(Window.prototype, NamedPropertiesObject);
1545715459
1545815460 if (globalObject[ctorRegistry] === undefined) {
0 commit comments