File tree 2 files changed +12
-22
lines changed 2 files changed +12
-22
lines changed Original file line number Diff line number Diff line change 4
4
5
5
< link rel ="stylesheet " type ="text/css " href ="style.css " />
6
6
< script src ="titlebar.js "> </ script >
7
- < script src ="frameless_window.js "> </ script >
8
7
</ head >
9
8
10
9
< body >
19
18
< button id ="close-window-button "> Close Window</ button >
20
19
</ div >
21
20
</ div >
21
+
22
+ < script src ="frameless_window.js "> </ script >
22
23
</ body >
23
24
</ html >
Original file line number Diff line number Diff line change 1
1
2
2
/**
3
- * This code shows the problem with issue #7715 on NWJS
3
+ * This code shows the problem with issue #7715 on NWJS -- version 2, showing that a child process is the problem
4
4
*
5
5
* Go into folder with package.json, and run below commands. Time spend is shown in window.
6
6
*
@@ -27,23 +27,12 @@ window.onload = function() {
27
27
//
28
28
29
29
30
- const simpleGit = require ( 'simple-git' ) ; // npm install simple-git
31
-
32
- const delayInMs = 1000 ;
33
- window . setInterval ( _update , delayInMs ) ; // continuously call _update
34
-
35
- async function _update ( ) {
36
-
37
- var startTime = performance . now ( ) ;
38
-
39
- var isRepo ;
40
- await simpleGit ( ) . checkIsRepo ( onCheckIsRepo ) ;
41
- function onCheckIsRepo ( err , checkResult ) {
42
- isRepo = checkResult
43
- console . log ( ' ' ) ;
44
- console . log ( `_update took ${ performance . now ( ) - startTime } ms (at onCheckIsRepo)` ) ;
45
- document . getElementById ( 'time' ) . innerText = `${ performance . now ( ) - startTime } ms` ;
46
- }
47
-
48
-
49
- }
30
+ var startTime = performance . now ( ) ;
31
+
32
+ const { exec } = require ( "child_process" )
33
+ exec ( 'git' )
34
+
35
+
36
+ console . log ( ' ' ) ;
37
+ console . log ( `_update took ${ performance . now ( ) - startTime } ms (at _update3)` ) ;
38
+ document . getElementById ( 'time' ) . innerText = `${ performance . now ( ) - startTime } ms` ;
You can’t perform that action at this time.
0 commit comments