8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
globalThis
1 parent f67b8e0 commit 1017362Copy full SHA for 1017362
pyscriptjs/src/utils.ts
@@ -97,9 +97,7 @@ export function globalExport(name: string, obj: object) {
97
// attach the given object to the global object, so that it is globally
98
// visible everywhere. Should be used very sparingly!
99
100
- // `window` in the browser, `global` in node
101
- const _global = window || global;
102
- _global[name] = obj;
+ globalThis[name] = obj;
103
}
104
105
export function getAttribute(el: Element, attr: string): string | null {
0 commit comments