From: Mike Taylor Date: Mon, 12 Jan 2015 16:46:49 +0000 (+0000) Subject: Add mkws.aliasWidgetType() function. X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=f4860b3d6d8965ad2999eca215adb801defdf7a2;p=mkws-moved-to-github.git Add mkws.aliasWidgetType() function. Will be used for making "reference" work like "wikipedia". --- diff --git a/src/mkws-core.js b/src/mkws-core.js index 528ed94..327519a 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -159,6 +159,12 @@ mkws.registerWidgetType = function(name, fn) { mkws.info("registered widget-type '" + name + "'"); }; +mkws.aliasWidgetType = function(newName, oldName) { + mkws.widgetType2function[newName] = mkws.widgetType2function[oldName]; + mkws.info("aliased widget-type '" + newName + "' to '" + oldName + "'"); + +}; + mkws.promotionFunction = function(name) { return mkws.widgetType2function[name]; };