for (i = attrNames.length; i--;) {
  attrName = attrNames[i]
  MarkupBuilder.prototype[attrName] = new Function("value",
    "this.attr('" + attrName + "', value); return this")
}