This commit is contained in:
Cheng Zhao
2013-03-24 23:14:08 +08:00
parent 6ce25d4c71
commit 7effc4c456
2 changed files with 9 additions and 2 deletions

View File

@@ -1,3 +1,10 @@
# This file is loaded within Task's worker process. It will attempt to invoke
# any message with a 'method' and 'args' key on the global `handler` object. The
# initial `handler` object contains the `start` method, which is called by the
# task itself to relay information from the window thread and bootstrap the
# worker's environment. The `start` method then replaces the handler with an
# object required from the given `handlerPath`.
global.window = {}
global.attachEvent = ->
console =

View File

@@ -4,7 +4,7 @@ EventEmitter = require 'event-emitter'
fs = require 'fs-utils'
module.exports =
class ProcessTask
class Task
aborted: false
constructor: (@path) ->
@@ -58,4 +58,4 @@ class ProcessTask
@worker = null
@trigger 'task-completed'
_.extend ProcessTask.prototype, EventEmitter
_.extend Task.prototype, EventEmitter