-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathframeless_window.js
38 lines (26 loc) · 962 Bytes
/
frameless_window.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* This code shows the problem with issue #7715 on NWJS -- version 2, showing that a child process is the problem
*
* Go into folder with package.json, and run below commands. Time spend is shown in window.
*
* Slow : /Applications/nwjs_v0.51.0.app/Contents/MacOS/nwjs --remote-debugging-port=9222 .
* Fast : /Applications/nwjs_v0.50.3.app/Contents/MacOS/nwjs --remote-debugging-port=9222 .
*
*/
// INIT WINDOW
var gui = require("nw.gui");
window.onload = function() {
document.getElementById("close-window-button").onclick = function() {
window.close();
};
gui.Window.get().show();
};
//
// HERE GOES NEW CODE SHOWING NWJS ISSUE #7715
//
var startTime = performance.now();
const { exec } = require("child_process")
exec('git')
console.log(' ');
console.log(`_update took ${ performance.now() - startTime} ms (at _update3)`);
document.getElementById('time').innerText = `${ performance.now() - startTime} ms`;