src/node/patcher/attrs.js
function set(name, element, previous, attrs) {
  if (set.handlers[name]) {
    set.handlers[name](name, element, previous, attrs);
  } else if (attrs[name] != null && previous[name] !== attrs[name]) {
    element.setAttribute(name, attrs[name]);
  }
}
function set(name, element, previous, attrs) {
  if (set.handlers[name]) {
    set.handlers[name](name, element, previous, attrs);
  } else if (attrs[name] != null && previous[name] !== attrs[name]) {
    element.setAttribute(name, attrs[name]);
  }
}
function set ( name , element , previous , attrs ) { if ( set . handlers [ name ] ) { set . handlers [ name ] ( name , element , previous , attrs ) ; } else if ( attrs [ name ] != null && previous [ name ] !== attrs [ name ] ) { element . setAttribute ( name , attrs [ name ] ) ; } }
Sets an attribute.

@param  String name      The attribute name to set.
@param  Object element   A DOM element.
@param  Object previous  The previous state of attributes.
@param  Object attrs     The attributes to match on.
Sets an attribute .