Skip to content

Commit 96794fa

Browse files
committed
Fix implSymbol name with reflection
1 parent 5d7f5e2 commit 96794fa

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

lib/constructs/attribute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Attribute {
4343
getterBody = `return Impl.implementation["${this.idl.name}"];`;
4444
setterBody = `Impl.implementation["${this.idl.name}"] = V;`;
4545
} else if (shouldReflect) {
46-
const processedOutput = this.ctx.invokeProcessReflect(this.idl, "esValue[impl]", { requires });
46+
const processedOutput = this.ctx.invokeProcessReflect(this.idl, "esValue[implSymbol]", { requires });
4747
getterBody = processedOutput.get;
4848
setterBody = processedOutput.set;
4949
}

test/__snapshots__/test.js.snap

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,7 +2261,7 @@ exports.install = function install(globalObject) {
22612261
throw new TypeError(\\"Illegal invocation\\");
22622262
}
22632263

2264-
return esValue[impl].hasAttributeNS(null, \\"reflectedboolean\\");
2264+
return esValue[implSymbol].hasAttributeNS(null, \\"reflectedboolean\\");
22652265
}
22662266

22672267
set reflectedBoolean(V) {
@@ -2276,9 +2276,9 @@ exports.install = function install(globalObject) {
22762276
});
22772277

22782278
if (V) {
2279-
esValue[impl].setAttributeNS(null, \\"reflectedboolean\\", \\"\\");
2279+
esValue[implSymbol].setAttributeNS(null, \\"reflectedboolean\\", \\"\\");
22802280
} else {
2281-
esValue[impl].removeAttributeNS(null, \\"reflectedboolean\\");
2281+
esValue[implSymbol].removeAttributeNS(null, \\"reflectedboolean\\");
22822282
}
22832283
}
22842284

@@ -2289,7 +2289,7 @@ exports.install = function install(globalObject) {
22892289
throw new TypeError(\\"Illegal invocation\\");
22902290
}
22912291

2292-
const value = esValue[impl].getAttributeNS(null, \\"reflecteddomstring\\");
2292+
const value = esValue[implSymbol].getAttributeNS(null, \\"reflecteddomstring\\");
22932293
return value === null ? \\"\\" : value;
22942294
}
22952295

@@ -2304,7 +2304,7 @@ exports.install = function install(globalObject) {
23042304
context: \\"Failed to set the 'reflectedDOMString' property on 'Reflect': The provided value\\"
23052305
});
23062306

2307-
esValue[impl].setAttributeNS(null, \\"reflecteddomstring\\", V);
2307+
esValue[implSymbol].setAttributeNS(null, \\"reflecteddomstring\\", V);
23082308
}
23092309

23102310
get reflectedLong() {
@@ -2314,7 +2314,7 @@ exports.install = function install(globalObject) {
23142314
throw new TypeError(\\"Illegal invocation\\");
23152315
}
23162316

2317-
const value = parseInt(esValue[impl].getAttributeNS(null, \\"reflectedlong\\"));
2317+
const value = parseInt(esValue[implSymbol].getAttributeNS(null, \\"reflectedlong\\"));
23182318
return isNaN(value) || value < -2147483648 || value > 2147483647 ? 0 : value;
23192319
}
23202320

@@ -2329,7 +2329,7 @@ exports.install = function install(globalObject) {
23292329
context: \\"Failed to set the 'reflectedLong' property on 'Reflect': The provided value\\"
23302330
});
23312331

2332-
esValue[impl].setAttributeNS(null, \\"reflectedlong\\", String(V));
2332+
esValue[implSymbol].setAttributeNS(null, \\"reflectedlong\\", String(V));
23332333
}
23342334

23352335
get reflectedUnsignedLong() {
@@ -2339,7 +2339,7 @@ exports.install = function install(globalObject) {
23392339
throw new TypeError(\\"Illegal invocation\\");
23402340
}
23412341

2342-
const value = parseInt(esValue[impl].getAttributeNS(null, \\"reflectedunsignedlong\\"));
2342+
const value = parseInt(esValue[implSymbol].getAttributeNS(null, \\"reflectedunsignedlong\\"));
23432343
return isNaN(value) || value < 0 || value > 2147483647 ? 0 : value;
23442344
}
23452345

@@ -2354,7 +2354,7 @@ exports.install = function install(globalObject) {
23542354
context: \\"Failed to set the 'reflectedUnsignedLong' property on 'Reflect': The provided value\\"
23552355
});
23562356

2357-
esValue[impl].setAttributeNS(null, \\"reflectedunsignedlong\\", String(V > 2147483647 ? 0 : V));
2357+
esValue[implSymbol].setAttributeNS(null, \\"reflectedunsignedlong\\", String(V > 2147483647 ? 0 : V));
23582358
}
23592359

23602360
get reflectedUSVStringURL() {
@@ -2364,7 +2364,7 @@ exports.install = function install(globalObject) {
23642364
throw new TypeError(\\"Illegal invocation\\");
23652365
}
23662366

2367-
const value = esValue[impl].getAttributeNS(null, \\"reflectedusvstringurl\\");
2367+
const value = esValue[implSymbol].getAttributeNS(null, \\"reflectedusvstringurl\\");
23682368
if (value === null) {
23692369
return \\"\\";
23702370
}
@@ -2383,7 +2383,7 @@ exports.install = function install(globalObject) {
23832383
context: \\"Failed to set the 'reflectedUSVStringURL' property on 'Reflect': The provided value\\"
23842384
});
23852385

2386-
esValue[impl].setAttributeNS(null, \\"reflectedusvstringurl\\", V);
2386+
esValue[implSymbol].setAttributeNS(null, \\"reflectedusvstringurl\\", V);
23872387
}
23882388

23892389
get reflectionTest() {
@@ -2393,7 +2393,7 @@ exports.install = function install(globalObject) {
23932393
throw new TypeError(\\"Illegal invocation\\");
23942394
}
23952395

2396-
const value = esValue[impl].getAttributeNS(null, \\"reflection\\");
2396+
const value = esValue[implSymbol].getAttributeNS(null, \\"reflection\\");
23972397
return value === null ? \\"\\" : value;
23982398
}
23992399

@@ -2408,7 +2408,7 @@ exports.install = function install(globalObject) {
24082408
context: \\"Failed to set the 'reflectionTest' property on 'Reflect': The provided value\\"
24092409
});
24102410

2411-
esValue[impl].setAttributeNS(null, \\"reflection\\", V);
2411+
esValue[implSymbol].setAttributeNS(null, \\"reflection\\", V);
24122412
}
24132413

24142414
get withUnderscore() {
@@ -2418,7 +2418,7 @@ exports.install = function install(globalObject) {
24182418
throw new TypeError(\\"Illegal invocation\\");
24192419
}
24202420

2421-
const value = esValue[impl].getAttributeNS(null, \\"with-underscore\\");
2421+
const value = esValue[implSymbol].getAttributeNS(null, \\"with-underscore\\");
24222422
return value === null ? \\"\\" : value;
24232423
}
24242424

@@ -2433,7 +2433,7 @@ exports.install = function install(globalObject) {
24332433
context: \\"Failed to set the 'withUnderscore' property on 'Reflect': The provided value\\"
24342434
});
24352435

2436-
esValue[impl].setAttributeNS(null, \\"with-underscore\\", V);
2436+
esValue[implSymbol].setAttributeNS(null, \\"with-underscore\\", V);
24372437
}
24382438
}
24392439
Object.defineProperties(Reflect.prototype, {

0 commit comments

Comments
 (0)