|
10 | 10 | <script>
|
11 | 11 | var gui = nw;
|
12 | 12 | var win;
|
| 13 | + |
| 14 | + |
13 | 15 | gui.Window.open('popup.html', {
|
14 | 16 | x: 100, y: 100, width: 200, height: 300
|
15 | 17 | }, function(w) { win = w; });
|
|
39 | 41 | if (win != null)
|
40 | 42 | win.close(true);
|
41 | 43 | this.close(true);
|
42 |
| - }); |
| 44 | + }); |
43 | 45 |
|
44 | 46 | gui.Window.get().show();
|
45 | 47 | </script>
|
|
51 | 53 | <br/>
|
52 | 54 | <button onclick="win.hide()">Hide</button>
|
53 | 55 | <br/>
|
| 56 | +<button onclick="win.reloadDev()">reloadDev</button> |
| 57 | +<br/> |
| 58 | +<button onclick="win.setPosition('center')">setPosition(center)</button> |
| 59 | +<<!--button onclick="win.setPosition('mouse')">mouse</button>--> |
| 60 | +<br/> |
54 | 61 | <button onclick="win.maximize()">Maximize</button>
|
55 | 62 | <br/>
|
56 | 63 | <button onclick="win.unmaximize()">Unmaximize</button>
|
|
63 | 70 | <br/>
|
64 | 71 | <button onclick="win.leaveFullscreen()">LeaveFullscreen</button>
|
65 | 72 | <br/>
|
| 73 | +<button onclick="win.toggleFullscreen()">toggleFullscreen</button> |
| 74 | +<br/> |
66 | 75 | <button onclick="win.close()">Close</button>
|
67 | 76 | <br/>
|
68 | 77 | <button onclick="win.close(true)">Force Close</button>
|
69 | 78 | <br/>
|
70 | 79 | <button onclick="win.showDevTools()">Open DevTools</button>
|
71 | 80 | <br/>
|
| 81 | +<button onclick="win.closeDevTools()">Close DevTools</button> |
| 82 | +<br/> |
72 | 83 | <button onclick="win.setMinimumSize(100, 200)">setMinimumSize(100, 200)</button>
|
73 | 84 | <br/>
|
74 | 85 | <button onclick="win.setMaximumSize(200, 400)">setMaximumSize(200, 400)</button>
|
|
84 | 95 | <button onclick="win.setResizable(true)">setResizable(true)</button>
|
85 | 96 | <button onclick="win.setResizable(false)">(false)</button>
|
86 | 97 | <br/>
|
| 98 | +<!--<button onclick="win.setShadow(true)">setShadow (MAC)(true)</button> |
| 99 | +<button onclick="win.setShadow(false)">(false)</button> |
| 100 | +<br/>--> |
| 101 | +<button onclick="win.setVisibleOnAllWorkspaces(true)">setVisibleOnAllWorkspaces(MAC,LINUX)(true)</button> |
| 102 | +<button onclick="win.setVisibleOnAllWorkspaces(false)">(false)</button> |
| 103 | +<br/> |
| 104 | +<button onclick="win.setShowInTaskbar(true)">setShowInTaskbar (true)</button> |
| 105 | +<button onclick="win.setShowInTaskbar(false)">(false)</button> |
| 106 | +<br/> |
| 107 | +<button onclick="win.requestAttention(true)">requestAttention (true)</button> |
| 108 | +<button onclick="win.requestAttention(false)">(false)</button> |
| 109 | +<br/> |
| 110 | +<button onclick="win.requestAttention(10)">requestAttention (10s)</button> |
| 111 | +<br/> |
| 112 | +<button onclick="win.enterKioskMode()">enterKioskMode</button> |
| 113 | +<br/> |
| 114 | +<button onclick="win.leaveKioskMode()">leaveKioskMode</button> |
| 115 | +<br/> |
| 116 | +<button onclick="win.toggleKioskMode()">toggleKioskMode</button> |
| 117 | +<br/> |
| 118 | +<button onclick="win.print({})">print</button> |
| 119 | +<br/> |
87 | 120 | <p>Focus another application within 2sec, popup window should on top.</p>
|
88 | 121 | <button onclick="setTimeout(function(){win.setAlwaysOnTop(true);},2000)">setAlwaysOnTop(true)</button>
|
89 | 122 | <button onclick="win.setAlwaysOnTop(false)">(false)</button>
|
|
94 | 127 | <br/>
|
95 | 128 | <button onclick="takeSnapshot()">takeSnapshot</button>
|
96 | 129 | <br/>
|
| 130 | +<!--<button onclick="removeAllListeners()">removeAllListeners</button> |
| 131 | +<br/>--> |
97 | 132 | Reload the window and do all tests again.
|
| 133 | +<br/> |
98 | 134 | <button onclick="win.reload()">Reload</button>
|
| 135 | +<br/> |
| 136 | +<button onclick="win.reloadIgnoringCache()">Reload ignoring cache</button> |
99 | 137 | </body>
|
100 | 138 | </html>
|
0 commit comments