From: Mike Taylor Date: Thu, 27 Mar 2014 13:15:43 +0000 (+0000) Subject: Move mkws.log out of immediate-execute wrapper. X-Git-Tag: 1.0.0~1157 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=24209a0a9c198492db94011f1cf7862ff80937f2;p=mkws-moved-to-github.git Move mkws.log out of immediate-execute wrapper. --- 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 + "'");