Skip to content

Commit 7ad6ef7

Browse files
committed
Emit only instance members from global polluters
1 parent be2cad9 commit 7ad6ef7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/build/emitter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ export function emitWebIdl(
803803
if (
804804
p.name === "name" &&
805805
i.name === "Window" &&
806-
emitScope === EmitScope.All
806+
emitScope === EmitScope.InstanceOnly
807807
) {
808808
printer.printLine("/** @deprecated */");
809809
printer.printLine("declare const name: void;");
@@ -1064,7 +1064,7 @@ export function emitWebIdl(
10641064
/// Emit all members of every interfaces at the root level.
10651065
/// Called only once on the global polluter object
10661066
function emitAllMembers(i: Browser.Interface) {
1067-
emitMembers(/*prefix*/ "declare var ", EmitScope.All, i);
1067+
emitMembers(/*prefix*/ "declare var ", EmitScope.InstanceOnly, i);
10681068

10691069
for (const relatedIName of iNameToIDependList[i.name]) {
10701070
const i = allInterfacesMap[relatedIName];

0 commit comments

Comments
 (0)