         'web-security': false
         'plugins': true
     current = new BrowserWindow options
+    if options.indexName?
+      windowsIndex[options.indexName] = current
     # Default menu in v0.27.3
     if process.versions['electron'] >= '0.27.3'
       current.setMenu options.menu || null

    # Close window really
    if options.realClose
      current.on 'closed', (e) ->
        idx = _.indexOf windows, current
        windows.splice idx, 1
    else if options.forceMinimize

  openFocusedWindowDevTools: ->
    BrowserWindow.getFocusedWindow()?.openDevTools
      detach: true
  getWindowsIndex: ->
    return global.windowsIndex
  getWindow: (name) ->
    return global.windowsIndex[name]
  getMainWindow: ->
    return global.mainWindow
