Add setImmediate function in renderer.
This commit is contained in:
parent
cc5db4dab9
commit
7ba03ce23d
1 changed files with 6 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
path = require 'path'
|
||||
path = require 'path'
|
||||
timers = require 'timers'
|
||||
Module = require 'module'
|
||||
|
||||
# Expose information of current process.
|
||||
|
@ -21,6 +22,10 @@ globalPaths.push path.join(process.resourcesPath, 'app')
|
|||
# Expose global variables.
|
||||
global.require = require
|
||||
global.module = module
|
||||
global.setImmediate = ->
|
||||
process.activateUvLoop()
|
||||
timers.setImmediate.apply this, arguments
|
||||
global.clearImmediate = timers.clearImmediate
|
||||
|
||||
# Set the __filename to the path of html file if it's file:// protocol.
|
||||
if window.location.protocol is 'file:'
|
||||
|
|
Loading…
Reference in a new issue