code: function(node, obj) {
          var value;
          for(var name in obj) {
              value = obj[name].toString();
              if(value.match(/[A-Z]/)) {
                  // safari lowercases attributes with setAttribute
                  this.setAttributeNS(node, null, name, value);
              } else {
                  node.setAttribute(name, value);
              }
          }
      }
docs: Method: setAttributes
  Set multiple attributes given key value pairs from an object.
  
  Parameters:
  node - {Element} An element node.
  obj - {Object} An object whose properties represent attribute names and
  values represent attribute values.