Skip to content

Commit 0d08bfd

Browse files
authored
Merge pull request electron#263 from electron/remove-arrow-functions
Remove arrow functions
2 parents 455b226 + 848a268 commit 0d08bfd

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Because this project is intended for beginners we stick to mostly vanilla JavaSc
2222

2323
## Pull Requests and Issues
2424

25-
Tips for making an easier-to-reivew contribution:
25+
Tips for making an easier-to-review contribution:
2626

2727
- Please provide a description.
2828
- Include screenshots and animated GIFs whenever possible.

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
win = new BrowserWindow({ width: 400, height: 275 })
1010
win.on('resize', updateReply)
1111
win.on('move', updateReply)
12-
win.on('close', () => { win = null })
12+
win.on('close', function () { win = null })
1313
win.loadURL(modalPath)
1414
win.show()
1515
function updateReply () {

renderer-process/windows/using-window-events.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ const manageWindowBtn = document.getElementById('listen-to-window')
55
const focusModalBtn = document.getElementById('focus-on-modal-window')
66
let win
77

8-
manageWindowBtn.addEventListener('click', () => {
8+
manageWindowBtn.addEventListener('click', function () {
99
const modalPath = path.join('file://', __dirname, '../../sections/windows/modal-toggle-visibility.html')
1010
win = new BrowserWindow({ width: 600, height: 400 })
1111
win.on('focus', hideFocusBtn)
1212
win.on('blur', showFocusBtn)
13-
win.on('close', () => {
13+
win.on('close', function () {
1414
hideFocusBtn()
1515
win = null
1616
})
@@ -20,7 +20,7 @@ manageWindowBtn.addEventListener('click', () => {
2020
if (!win) return
2121
focusModalBtn.classList.add('smooth-appear')
2222
focusModalBtn.classList.remove('disappear')
23-
focusModalBtn.addEventListener('click', () => win.focus())
23+
focusModalBtn.addEventListener('click', function () { win.focus() })
2424
}
2525
function hideFocusBtn () {
2626
focusModalBtn.classList.add('disappear')

0 commit comments

Comments
 (0)