give anonymous function a name

This commit is contained in:
Zeke Sikelianos 2016-03-30 16:29:30 -07:00 committed by Kevin Sawicki
parent 9efd29d059
commit 252121ac70

View file

@ -6,12 +6,13 @@ const remote = require('electron').remote
// Cache browser window visibility // Cache browser window visibility
var _isVisible = true var _isVisible = true
var _isMinimized = false var _isMinimized = false
;(function () { var initWindow = function initWindow () {
var currentWindow var currentWindow
currentWindow = remote.getCurrentWindow() currentWindow = remote.getCurrentWindow()
_isVisible = currentWindow.isVisible() _isVisible = currentWindow.isVisible()
_isMinimized = currentWindow.isMinimized() _isMinimized = currentWindow.isMinimized()
})() }
initWindow()
// Helper function to resolve relative url. // Helper function to resolve relative url.
var a = window.top.document.createElement('a') var a = window.top.document.createElement('a')