Set an elements attribute. We accept the current element a function
because when a tag name changes we will lose reference to the actively
rendered element.

@param {Function} currentEl
@param {Function} nameFn
@param {Function} valueFn
434957
function (currentEl, nameFn, valueFn) {
  var attrName = subscribe.call(this, nameFn, null, function (value) {
    VM.removeAttribute(currentEl(), this.value);
    VM.setAttribute(currentEl(), this.value = value, attrValue.value);
  });

  var attrValue = subscribe.call(this, valueFn, null, function (value) {
    VM.setAttribute(currentEl(), attrName.value, this.value = value);
  });

  return VM.setAttribute(currentEl(), attrName.value, attrValue.value);
}
833161
function setDomAttrs(attrs, el) {
	for (let attr in attrs) {
		if (!attrs.hasOwnProperty(attr)) { continue; }
		switch (attr) {
			case 'className':
			case 'id':
				el[attr] = attrs[attr];
				break;
			default:
				el.setAttribute(attr, attrs[attr]);
				break;
		}
	}

	return el;
}
1092470
function setElAttributes(el, attributes) {
  Object.getOwnPropertyNames(attributes).forEach(function (attrName) {
    var attrValue = attributes[attrName];

    if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {
      el.removeAttribute(attrName);
    } else {
      el.setAttribute(attrName, attrValue === true ? '' : attrValue);
    }
  });
}
702755
public void setAttribute(final String attributeName, final String attributeValue) {
        uiObject.getElement().setAttribute(attributeName, attributeValue);
    }
1251563
function setAttribute(context, attr, value) {
    let currentAttrValue = context.getAttribute(attr);
    if (currentAttrValue !== value) {
        if (!isFalsy(value)) {
            if (typeof value === 'boolean') {
                value = '';
            }
            context.setAttribute(attr, value);
        } else if (currentAttrValue !== null) {
            context.removeAttribute(attr);
        }
    }
}
1223320
function _setSelfCloseElem(elem, elemName, elemParams, elemArr, tmplRule, outputH) {
  if (/\/$/.test(elemName)) {
    elemName = elemName.substr(0, elemName.length - 1);
  }

  _setElem(elem, elemName, elemParams, elemArr, true, tmplRule, outputH);
}
747685
function setAttr(attr, val){
        svgCanvas.changeSelectedAttribute(attr, val);
        S.call("changed", selElems);
    }
857397
function (el, attrName, val) {
			var usingMutationObserver = isOfGlobalDocument(el) && getMutationObserver();
			attrName = attrName.toLowerCase();
			var oldValue;
			// In order to later trigger an event we need to compare the new value to the old value,
			// so here we go ahead and retrieve the old value for browsers that don't have native MutationObservers.
			if (!usingMutationObserver) {
				oldValue = attr.get(el, attrName);
			}

			var newValue;
			var special = attr.special[attrName];
			var setter = special && special.set;
			var test = getSpecialTest(special);

			// First check if this is a special attribute with a setter.
			// Then run the special's test function to make sure we should
			// call its setter, and if so use the setter.
			// Otherwise fallback to setAttribute.
			if(typeof setter === "function" && test.call(el)) {
				// To distinguish calls with explicit undefined, e.g.:
				// - `attr.set(el, "checked")`
				// - `attr.set(el, "checked", undefined)`
				if (arguments.length === 2){
					newValue = setter.call(el);
				} else {
					newValue = setter.call(el, val);
				}
			} else {
				attr.setAttribute(el, attrName, val);
			}

			if (!usingMutationObserver && newValue !== oldValue) {
				attr.trigger(el, attrName, oldValue);
			}
		}
580889
function (node, name, value) {
    var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
    if (propertyInfo) {
      var mutationMethod = propertyInfo.mutationMethod;
      if (mutationMethod) {
        mutationMethod(node, value);
      } else if (shouldIgnoreValue(propertyInfo, value)) {
        this.deleteValueForProperty(node, name);
        return;
      } else if (propertyInfo.mustUseProperty) {
        // Contrary to `setAttribute`, object properties are properly
        // `toString`ed by IE8/9.
        node[propertyInfo.propertyName] = value;
      } else {
        var attributeName = propertyInfo.attributeName;
        var namespace = propertyInfo.attributeNamespace;
        // `setAttribute` with objects becomes only `[object]` in IE8/9,
        // ('' + value) makes it output the correct toString()-value.
        if (namespace) {
          node.setAttributeNS(namespace, attributeName, '' + value);
        } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
          node.setAttribute(attributeName, '');
        } else {
          node.setAttribute(attributeName, '' + value);
        }
      }
    } else if (DOMProperty.isCustomAttribute(name)) {
      DOMPropertyOperations.setValueForAttribute(node, name, value);
      return;
    }

    if ("development" !== 'production') {
      var payload = {};
      payload[name] = value;
      ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'update attribute', payload);
    }
  }
442581
function( attributes ) {
    let property;

    for ( property in attributes ) {
      if ( attributes.hasOwnProperty( property ) ) {
        this.element.setAttribute( property, attributes[property] );
      }
    }
  }
695251
function() {
      if (!this.el) {
        var attrs = getValue(this, 'attributes') || {};
        if (this.id) attrs.id = this.id;
        if (this.className) attrs['class'] = this.className;
        this.setElement(this.make(this.tagName, attrs), false);
      } else {
        this.setElement(this.el, false);
      }
    }
184104
function(element) {
    if (!(element && element.nodeType === 1)) {
      return;
    }
    if (_currentElement) {
      _removeClass(_currentElement, _globalConfig.activeClass);
      if (_currentElement !== element) {
        _removeClass(_currentElement, _globalConfig.hoverClass);
      }
    }
    _currentElement = element;
    _addClass(element, _globalConfig.hoverClass);
    var newTitle = element.getAttribute("title") || _globalConfig.title;
    if (typeof newTitle === "string" && newTitle) {
      var htmlBridge = _getHtmlBridge(_flashState.bridge);
      if (htmlBridge) {
        htmlBridge.setAttribute("title", newTitle);
      }
    }
    var useHandCursor = _globalConfig.forceHandCursor === true || _getStyle(element, "cursor") === "pointer";
    _setHandCursor(useHandCursor);
    _reposition();
  }
221283
public static void setAtt(Element el, String name, double d) {
    el.setAttribute(name, fmt(d));
  }
475405
function setAttributes(element, attributes) {
  Object.keys(attributes).forEach(function (prop) {
    var value = attributes[prop];
    if (value !== false) {
      element.setAttribute(prop, attributes[prop]);
    } else {
      element.removeAttribute(prop);
    }
  });
}
623179
function(attrs, callback) {
      var t = this;

      // Value is the only thing to set
      if (typeof attrs.value === 'undefined') {
        return callback({code:'NO_VALUE'});
      }

      // Set the model elements.  These cause change events to fire
      if (t.isModel) {
        t.value.set(attrs.value);
      }
      else {
        // Set the variable directly
        var jsonValue = JSON.stringify(attrs.value);
        t._evaluate(t.key + ' = ' + jsonValue);
        t.set('value', attrs.value);
      }
      return callback();
    }
418175
public void setValueAsJava(org.w3c.dom.Node n) {
	DOMProcessing.trimNode(n);
	try {
	    this.value=DOMProcessing.writeToString(n);
	} catch (TransformerConfigurationException e) {
	    this.value=n.toString();  // TODO: not the most compelling handling
	} catch (TransformerException e) {
	    this.value=n.toString(); //TODO: not the most compelling handling
	}
    }
1231351
public void setAttribute(String name, String value)
	{
		if (value != null)
			getElement().setAttribute(name, value);
		else
			getElement().removeAttribute(name);
	}