File tree Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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;
You can’t perform that action at this time.
0 commit comments