Sha256: dc6ce691329e65bb8559bb82398856c62895f0983722903b51b7c8e27ebe0baa
Contents?: true
Size: 446 Bytes
Versions: 7
Compression:
Stored size: 446 Bytes
Contents
//Global task list Kernel.tasks = []; Kernel.Task = function(name) { this.name = name; Kernel.tasks.push(this); this.sendEvent = function(type, info) { info.type = type; Kernel.sendEvent(info); } var handlers = []; this.on = function(name, callback) { handlers[name] = callback; } this.handle = function(type, event) { handler = handlers[type]; if (handler != undefined) { handler(event) } } }
Version data entries
7 entries across 7 versions & 1 rubygems