From: Mike Taylor Date: Tue, 25 Mar 2014 11:18:33 +0000 (+0000) Subject: Add widget-level debug() function. X-Git-Tag: 1.0.0~1270 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=9a5527fe29ae27c5e3e87bc9464b8c91c8225ead Add widget-level debug() function. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 43c4d78..fc50e13 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -172,14 +172,18 @@ function widget($, team, type, node) { var promote = type2fn[type]; if (promote) { promote(); - team.debug("made " + type + " widget(node=" + node + ")"); + debug("made " + type + " widget(node=" + node + ")"); } else { - team.debug("made UNENCAPSULATED widget(type=" + type + ", node=" + node + ")"); + debug("made UNENCAPSULATED widget(type=" + type + ", node=" + node + ")"); } return that; + function debug(s) { + team.debug(s); + } + // Functions follow for promoting the regular widget object into // widgets of specific types. These could be moved outside of the // widget object, or even into their own source files.