From 17e67a5bf95b80011279f04ff3c8b6650bf03ed4 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 19 Nov 2012 16:55:10 +0000 Subject: [PATCH] Add a simple log wrapper We'll make it more sophisticated at some point --- core/boot.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/boot.js b/core/boot.js index ba6e25f13..fb6c72070 100644 --- a/core/boot.js +++ b/core/boot.js @@ -102,6 +102,16 @@ $tw.config.contentTypeInfo = { $tw.utils = $tw.utils || {}; +/* +Log a message +*/ +$tw.utils.log = function(/* args */) { + if(console !== undefined && console.log !== undefined) { + return window.console && console.log + && Function.apply.call(console.log, console, arguments); + } +}; + /* Check if an object has a property */