mirror of
https://github.com/atom/atom.git
synced 2026-02-17 10:01:25 -05:00
Pass explicit window global into AtomEnvironment on construction
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user