From: Mike Taylor Date: Thu, 27 Mar 2014 15:43:57 +0000 (+0000) Subject: Move registerWidgetType and promotionFunction outside the X-Git-Tag: 1.0.0~1151 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=4d14df7f445cfbe077dbd93cdeac23f9e1455892;p=mkws-moved-to-github.git Move registerWidgetType and promotionFunction outside the self-executing function. --- diff --git a/src/mkws-core.js b/src/mkws-core.js index 7a260f2..4d38974 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -102,21 +102,20 @@ mkws.log = function(string) { }; +mkws.registerWidgetType = function(name, fn) { + mkws.widgetType2function[name] = fn; + mkws.log("registered widget-type '" + name + "'"); +}; + +mkws.promotionFunction = function(name) { + return mkws.widgetType2function[name]; +}; + // 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 + "'"); - }; - - mkws.promotionFunction = function(name) { - return mkws.widgetType2function[name]; - }; - - function handleNodeWithTeam(node, callback) { // First branch for DOM objects; second branch for jQuery objects var classes = node.className || node.attr('class');