Global.renderMarkupPart (name, start, end, attr)
helper function to render an arbitrary markup part

  • Parameter String:
    the element's name
  • Parameter String:
    prefix of each rendered element
  • Parameter String:
    suffix of each rendered element
  • Parameter Object:
    optional element's attributes
Sourcecode in /home/hannes/helma/modules/helma/Html.js:
36:   var renderMarkupPart = function(name, start, end, attr) {
37:           res.write(start);
38:           res.write(name);
39:           if (attr) {
40:               for (var i in attr) {
41:                   if (i == "prefix" || i == "suffix" || 
42:                       i == "default" || attr[i] == null) {
43:                       continue;
44:                   }
45:                  res.write(" ");
46:                  res.write(i);
47:                  res.write("=\"");
48:                  res.write(attr[i]);
49:                  res.write("\"");
50:              }
51:          }
52:          res.write(end);
53:          return;
54:      }