10 lines
230 B
JavaScript
10 lines
230 B
JavaScript
const fallbackWindow = {};
|
|
export function locateWindow() {
|
|
if (typeof window !== "undefined") {
|
|
return window;
|
|
}
|
|
else if (typeof self !== "undefined") {
|
|
return self;
|
|
}
|
|
return fallbackWindow;
|
|
}
|