mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 19:25:35 -05:00
Use globalThis (#908)
This commit is contained in:
@@ -97,9 +97,7 @@ export function globalExport(name: string, obj: object) {
|
||||
// attach the given object to the global object, so that it is globally
|
||||
// visible everywhere. Should be used very sparingly!
|
||||
|
||||
// `window` in the browser, `global` in node
|
||||
const _global = window || global;
|
||||
_global[name] = obj;
|
||||
globalThis[name] = obj;
|
||||
}
|
||||
|
||||
export function getAttribute(el: Element, attr: string): string | null {
|
||||
|
||||
Reference in New Issue
Block a user