code: function patch(element, previous, attrs) {
    if (!previous && !attrs) {
      return attrs;
    }
    var attrName, ns, name, value, split;
    previous = previous || {};
    attrs = attrs || {};
  
    for (attrName in previous) {
      if (previous[attrName] && !attrs[attrName]) {
        split = splitAttrName(attrName);
        ns = namespaces[split[0]];
        name = split[1];
        element.removeAttributeNS(ns, name);
      }
    }
    for (attrName in attrs) {
      value = attrs[attrName];
      if (previous[attrName] === value) {
        continue;
      }
      if (value) {
        split = splitAttrName(attrName);
        ns = namespaces[split[0]];
        name = split[1];
        element.setAttributeNS(ns, name, value);
      }
    }
    return attrs;
  }
docs: Maintains state of element namespaced attributes.
  
  @param  Object element   A DOM element.
  @param  Object previous  The previous state of attributes.
  @param  Object attrs     The attributes to match on.
  @return Object attrs     The element attributes state.