You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/References/Window.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,20 +187,20 @@ Hide the window. User will not be able to find the window once it's hidden.
187
187
188
188
## win.close([force])
189
189
190
-
*`force``{Boolean}` specify whether to close the window forcely and bypass `close` event.
190
+
*`force``{Boolean}` specify whether to close the window forcefully and bypass the`close` event.
191
191
192
-
Close current window. And you can prevent the closing by listening to the `close` event. If `force` is specified and equals to`true`, then the `close` event will be ignored.
192
+
Closes the current window. You can prevent the closing by listening to the `close` event. If `force` is specified and equals `true`, then the `close` event will be ignored.
193
193
194
194
Usually you would like to listen to the `close` event and do some shutdown work and then do a `close(true)` to really close the window.
195
195
196
196
```javascript
197
-
win.on('close', function() {
197
+
win.on('close', function() {
198
198
this.hide(); // Pretend to be closed already
199
199
console.log("We're closing...");
200
-
this.close(true); // then close it forcely
200
+
this.close(true); // then close it forcefully
201
201
});
202
202
203
-
win.close();
203
+
win.close();// Would be detected by the above close event. To skip the above close event use win.close(true);
0 commit comments