src/dom/setAttribute.js
function setAttribute(element, name, value) {
  assertType(element, Node, false, 'Invalid element specified');
  if (value === undefined || value === null || value === false)
    element.removeAttribute(name);
  else if (value === true)
    element.setAttribute(name, '');
  else
    element.setAttribute(name, value);
  if (name === 'disabled' && element.setDirty)
    element.setDirty(DirtyType.STATE);
}
function setAttribute(element, name, value) {
  assertType(element, Node, false, 'Invalid element specified');
  if (value === undefined || value === null || value === false)
    element.removeAttribute(name);
  else if (value === true)
    element.setAttribute(name, '');
  else
    element.setAttribute(name, value);
  if (name === 'disabled' && element.setDirty)
    element.setDirty(DirtyType.STATE);
}
function setAttribute ( element , name , value ) { assertType ( element , Node , false , 'Invalid element specified' ) ; if ( value === undefined || value === null || value === false ) element . removeAttribute ( name ) ; else if ( value === true ) element . setAttribute ( name , '' ) ; else element . setAttribute ( name , value ) ; if ( name === 'disabled' && element . setDirty ) element . setDirty ( DirtyType . STATE ) ; }
Sets an attribute of an element by the attribute name.

@param {Node} element - Target element.
@param {string} name - Attribute name.
@param {*} value - Attribute value.

@alias module:requiem~dom.setAttribute
Sets an attribute of an element by the attribute name .