@noatgnu/cupcake-vanilla 1.4.7 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3097,8 +3097,17 @@ class DesktopService {
|
|
|
3097
3097
|
window.electronAPI !== undefined &&
|
|
3098
3098
|
window.electronAPI.isElectron === true;
|
|
3099
3099
|
}
|
|
3100
|
+
/**
|
|
3101
|
+
* Wails only injects `window._wails` once the page has finished loading, which is after
|
|
3102
|
+
* this service is constructed, so the asset-server origin is checked as well: the `wails:`
|
|
3103
|
+
* scheme on Linux/macOS and the `wails.localhost` host on Windows.
|
|
3104
|
+
*/
|
|
3100
3105
|
hasWails() {
|
|
3101
|
-
|
|
3106
|
+
if (typeof window === 'undefined')
|
|
3107
|
+
return false;
|
|
3108
|
+
return '_wails' in window ||
|
|
3109
|
+
window.location.protocol === 'wails:' ||
|
|
3110
|
+
window.location.hostname === 'wails.localhost';
|
|
3102
3111
|
}
|
|
3103
3112
|
get runtime() {
|
|
3104
3113
|
return this._runtime;
|