From 24209a0a9c198492db94011f1cf7862ff80937f2 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 27 Mar 2014 13:15:43 +0000 Subject: [PATCH] Move mkws.log out of immediate-execute wrapper. --- src/mkws-core.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mkws-core.js b/src/mkws-core.js index 53d19e7..9cb794f 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -84,9 +84,7 @@ if (mkws_config == null || typeof mkws_config != 'object') { } -// wrapper to call team() after page load -(function(j) { - function log(string) { + mkws.log = function(string) { if (!mkws.log_level) return; @@ -101,10 +99,14 @@ if (mkws_config == null || typeof mkws_config != 'object') { console.log(">>> called from function " + arguments.callee.caller.name + ' <<<'); } console.log(string); - } - mkws.log = log; + }; + +// wrapper to call team() after page load +(function(j) { + var log = mkws.log; + mkws.registerWidgetType = function(name, fn) { mkws.widgetType2function[name] = fn; log("registered widget-type '" + name + "'"); -- 1.7.10.4