Skip to content

Commit b4febe7

Browse files
author
Jessica Lord
authored
Merge pull request electron#225 from electron/close-event
Use close event instead of closed
2 parents 96b0367 + 61216bf commit b4febe7

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

renderer-process/windows/create-window.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const newWindowBtn = document.getElementById('new-window')
66
newWindowBtn.addEventListener('click', function (event) {
77
const modalPath = path.join('file://', __dirname, '../../sections/windows/modal.html')
88
let win = new BrowserWindow({ width: 400, height: 320 })
9-
win.on('closed', function () { win = null })
9+
win.on('close', function () { win = null })
1010
win.loadURL(modalPath)
1111
win.show()
1212
})

renderer-process/windows/frameless-window.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const path = require('path')
66
newWindowBtn.addEventListener('click', function (event) {
77
const modalPath = path.join('file://', __dirname, '../../sections/windows/modal.html')
88
let win = new BrowserWindow({ frame: false })
9-
win.on('closed', function () { win = null })
9+
win.on('close', function () { win = null })
1010
win.loadURL(modalPath)
1111
win.show()
1212
})

renderer-process/windows/manage-window.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manageWindowBtn.addEventListener('click', function (event) {
99

1010
win.on('resize', updateReply)
1111
win.on('move', updateReply)
12-
win.on('closed', function () { win = null })
12+
win.on('close', function () { win = null })
1313
win.loadURL(modalPath)
1414
win.show()
1515

renderer-process/windows/process-crash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ processCrashBtn.addEventListener('click', function (event) {
2222
})
2323
})
2424

25-
win.on('closed', function () { win = null })
25+
win.on('close', function () { win = null })
2626
win.loadURL(crashWinPath)
2727
win.show()
2828
})

renderer-process/windows/process-hang.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ processHangBtn.addEventListener('click', function (event) {
2222
})
2323
})
2424

25-
win.on('closed', function () { win = null })
25+
win.on('close', function () { win = null })
2626
win.loadURL(hangWinPath)
2727
win.show()
2828
})

0 commit comments

Comments
 (0)