β„Ή
Info
We provide helpful information via the window.todesktop object. Here is an overview of what's available:
1
if (window.todesktop) {
2
/*
3
The current version of your app: e.g. '1.0.0'
4
*/
5
console.log(window.todesktop.version);
6
7
/*
8
The current version of Electron: e.g. '7.1.2'
9
*/
10
console.log(window.todesktop.electronVersion);
11
12
/*
13
Same as os.platform() in node: e.g. 'darwin'
14
*/
15
console.log(window.todesktop.os.platform);
16
​
17
/*
18
Same as os.release() in node: e.g. '18.6.0'
19
*/
20
console.log(window.todesktop.os.release);
21
22
/*
23
Same as os.type() in node: e.g. 'Darwin'
24
*/
25
console.log(window.todesktop.os.type);
26
27
/*
28
Same as os.arch() in node: e.g. 'x64'
29
*/
30
console.log(window.todesktop.os.arch);
31
}
Copied!
Always make sure window.todesktop is present before trying to access its properties or use its methods.
Last modified 8d ago
Copy link