Use process.nextTick instead of MessageChannel

This commit is contained in:
Kevin Sawicki 2013-10-15 10:16:16 -07:00
parent 216a5e61fd
commit 5b6e8a1b20
4 changed files with 8 additions and 4 deletions

View File

@ -1,8 +1,12 @@
{View, $$, $$$} = require '../src/space-pen-extensions'
{Document, Point, Range, Site} = require 'telepath'
_ = require 'underscore-plus'
#TODO Remove once all packages have been updated
_.nextTick = process.nextTick
module.exports =
_: require 'underscore-plus'
_: _
$: require '../src/jquery-extensions'
$$: $$
$$$: $$$

View File

@ -1185,7 +1185,7 @@ class Editor extends View
return if @pendingDisplayUpdate
return unless @isVisible()
@pendingDisplayUpdate = true
_.nextTick =>
process.nextTick =>
@updateDisplay()
@pendingDisplayUpdate = false

View File

@ -130,7 +130,7 @@ class RootView extends View
@panes.reopenItem()
if @state.get('fullScreen')
_.nextTick => atom.setFullScreen(true)
process.nextTick => atom.setFullScreen(true)
# Private:
serialize: ->

View File

@ -13,7 +13,7 @@ windowEventHandler = null
# This is done in a next tick to prevent a white flicker from occurring
# if called synchronously.
displayWindow = ->
_.nextTick ->
process.nextTick ->
atom.show()
atom.focus()