Pass explicit window global into AtomEnvironment on construction

This commit is contained in:
Nathan Sobo
2015-10-13 19:35:51 -06:00
parent c8407167ee
commit 65ae175e72
6 changed files with 17 additions and 17 deletions

View File

@@ -101,7 +101,7 @@ class AtomEnvironment extends Model
# Call .loadOrCreate instead
constructor: (params={}) ->
{@applicationDelegate} = params
{@applicationDelegate, @window} = params
@state = {version: @constructor.version}
@@ -652,7 +652,7 @@ class AtomEnvironment extends Model
window.onerror = @previousWindowErrorHandler
installWindowEventHandler: ->
@windowEventHandler = new WindowEventHandler({atomEnvironment: this, @applicationDelegate})
@windowEventHandler = new WindowEventHandler({atomEnvironment: this, @applicationDelegate, @window})
uninstallWindowEventHandler: ->
@windowEventHandler?.unsubscribe()