mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-11 08:21:04 +00:00
14 lines
277 B
TypeScript
14 lines
277 B
TypeScript
|
|
export function IsDesktopApp(): boolean {
|
|
if (typeof window !== 'undefined') {
|
|
if ('__TAURI_INTERNALS__' in window) {
|
|
return true;
|
|
} else if ('__TAURI__' in window) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
(window as any).IsDesktopApp = IsDesktopApp;
|