Use globalThis (#908)

This commit is contained in:
woxtu
2022-10-31 23:25:36 +09:00
committed by GitHub
parent f67b8e0285
commit 1017362eec

View File

@@ -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 {