From 69c9ed3febb9a090954aa31ea3f8cefcab5da551 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 24 Jan 2013 12:18:52 -0800 Subject: [PATCH] Use self instead of hacky eval --- src/stdlib/task-shell.coffee | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/stdlib/task-shell.coffee b/src/stdlib/task-shell.coffee index 59ab05ea1..5aa610d67 100644 --- a/src/stdlib/task-shell.coffee +++ b/src/stdlib/task-shell.coffee @@ -1,14 +1,14 @@ -eval("window = {};") -eval("attachEvent = function(){};") -eval("console = {};") -console.warn = -> - self.postMessage - type: 'warn' - details: arguments -console.log = -> - self.postMessage - type: 'log' - details: arguments +self.window = {} +self.attachEvent = -> +self.console = + warn: -> + self.postMessage + type: 'warn' + details: arguments + log: -> + self.postMessage + type: 'log' + details: arguments self.addEventListener 'message', (event) -> switch event.data.type