Skip to content

Commit b5c8bfc

Browse files
TheJaredWilcurtrogerwang
authored andcommitted
Clean up English on win.close()
1 parent 578eda4 commit b5c8bfc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/References/Window.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,20 +187,20 @@ Hide the window. User will not be able to find the window once it's hidden.
187187

188188
## win.close([force])
189189

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.
191191

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.
193193

194194
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.
195195

196196
```javascript
197-
win.on('close', function() {
197+
win.on('close', function () {
198198
this.hide(); // Pretend to be closed already
199199
console.log("We're closing...");
200-
this.close(true); // then close it forcely
200+
this.close(true); // then close it forcefully
201201
});
202202

203-
win.close();
203+
win.close(); // Would be detected by the above close event. To skip the above close event use win.close(true);
204204
```
205205

206206
## win.reload()

0 commit comments

Comments
 (0)