Remove window.rootView shims

This commit is contained in:
Kevin Sawicki 2013-11-20 14:55:49 -08:00
parent bc1a743b2f
commit e4aa82fda1
2 changed files with 4 additions and 10 deletions

View File

@ -216,18 +216,14 @@ class AtomPackage extends Package
@activateStylesheets()
@requireMainModule()
# Private: TODO remove once packages have been updated
getRootView: ->
atom?.rootView ? window.rootView
subscribeToActivationEvents: ->
return unless @metadata.activationEvents?
if _.isArray(@metadata.activationEvents)
@getRootView().command(event, @handleActivationEvent) for event in @metadata.activationEvents
atom.rootView.command(event, @handleActivationEvent) for event in @metadata.activationEvents
else if _.isString(@metadata.activationEvents)
@getRootView().command(@metadata.activationEvents, @handleActivationEvent)
atom.rootView.command(@metadata.activationEvents, @handleActivationEvent)
else
@getRootView().command(event, selector, @handleActivationEvent) for event, selector of @metadata.activationEvents
atom.rootView.command(event, selector, @handleActivationEvent) for event, selector of @metadata.activationEvents
handleActivationEvent: (event) =>
bubblePathEventHandlers = @disableEventHandlersOnBubblePath(event)

View File

@ -171,9 +171,7 @@ class SelectList extends View
if @previouslyFocusedElement?.isOnDom()
@previouslyFocusedElement.focus()
else
# TODO Remove once all packages have been updated
rootView = atom?.rootView ? window.rootView
rootView.focus()
atom.rootView.focus()
# Public:
cancelled: ->