From 9a5527fe29ae27c5e3e87bc9464b8c91c8225ead Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 25 Mar 2014 11:18:33 +0000 Subject: [PATCH] Add widget-level debug() function. --- tools/htdocs/mkws.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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. -- 1.7.10.4