Skip to content

Commit 860200a

Browse files
ExE-BossTimothyGu
andcommitted
Address review comments
Co-authored-by: Timothy Gu <[email protected]>
1 parent b8e7e0e commit 860200a

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,6 @@ Notable missing features include:
479479
- `[AllowShared]`
480480
- `[Default]` (for `toJSON()` operations)
481481
- `[Global]`'s various consequences, including the named properties object and `[[SetPrototypeOf]]`
482-
- `[Exposed]`
483482
- `[LenientSetter]`
484483
- `[LenientThis]`
485484
- `[NamedConstructor]`

lib/constructs/callback-interface.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,7 @@ class CallbackInterface {
199199
generateInstall() {
200200
if (this.constants.size > 0) {
201201
this.str += `
202-
const exposed = new Set([
203-
`;
204-
205-
for (const globalName of this.exposed) {
206-
this.str += `"${globalName}",\n`;
207-
}
208-
209-
this.str += `
210-
]);
202+
const exposed = new Set(${JSON.stringify([...this.exposed])});
211203
`;
212204
}
213205

lib/constructs/interface.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,15 +1463,7 @@ class Interface {
14631463
const { idl, name } = this;
14641464

14651465
this.str += `
1466-
const exposed = new Set([
1467-
`;
1468-
1469-
for (const globalName of this.exposed) {
1470-
this.str += `"${globalName}",\n`;
1471-
}
1472-
1473-
this.str += `
1474-
]);
1466+
const exposed = new Set(${JSON.stringify([...this.exposed])});
14751467
14761468
exports.install = (globalObject, globalNames) => {
14771469
let isExposed = false;

0 commit comments

Comments
 (0)