From 4d14df7f445cfbe077dbd93cdeac23f9e1455892 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 27 Mar 2014 15:43:57 +0000 Subject: [PATCH] Move registerWidgetType and promotionFunction outside the self-executing function. --- src/mkws-core.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) 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'); -- 1.7.10.4