record clonable attributes from <element>
481523
function() {
      // inherit instance attributes
      var clonable = this.prototype._instanceAttributes;
      // merge attributes from element
      var a$ = this.attributes;
      for (var i=0, l=a$.length, a; (i<l) && (a=a$[i]); i++) {  
        if (this.isInstanceAttribute(a.name)) {
          clonable[a.name] = a.value;
        }
      }
    }
650015
function(el, deep) {
    var sub = document.createElement(el.nodeName)
      , attr = el.attributes
      , i = attr.length;

    while (i--) {
      if (attr[i].nodeValue) {
        sub.setAttribute(attr[i].name, attr[i].value);
      }
    }

    if (el.namespaceURI) {
      sub.namespaceURI = el.namespaceURI;
    }

    if (el.baseURI) {
      sub.baseURI = el.baseURI;
    }

    if (deep) {
      DOM.setContent(sub, DOM.getContent(el));
    }

    return clone; 
  }
1322915
function setElementAttribute(element, name, value) {
  try {
    genericMethodCall(
        Methods.SET_ATTRIBUTE, element, 'setAttribute', [name, value]);
  } catch (e) {
    // IE throws an exception if the src attribute contains HTTP credentials.
    // However the attribute gets set anyway.
    if (e.message.indexOf('A security problem occurred') != -1) {
      return;
    }
    throw e;
  }
}
340088
function processSlotOutlet (el) {
  if (el.tag === 'slot') {
    el.slotName = getBindingAttr(el, 'name');
    if (el.key) {
      warn$1(
        "`key` does not work on <slot> because slots are abstract outlets " +
        "and can possibly expand into multiple elements. " +
        "Use the key on a wrapping element instead.",
        getRawBindingAttr(el, 'key')
      );
    }
  }
}
70407
def _generate_dom_attrs(attrs, allow_no_value=True):
    
    for attr in iterate_items(attrs):
        if isinstance(attr, basestring):
            attr = (attr, True)
        key, value = attr
        if value is None:
            continue
        if value is True and not allow_no_value:
            value = key  # E.g. <option checked="true" />
        if value is True:
            yield True  # E.g. <option checked />
        else:
            yield '%s="%s"' % (key, value.replace('"', '\\"'))
1164051
def _serialize_attributes(attributes):
    """"""
    result = ''
    for name, value in attributes.items():
        if not value:
            continue
        result += ' ' + _unmangle_attribute_name(name)
        result += '="' + escape(value, True) + '"'
    return result
741152
function (attributes) {
            var val;

            for (var k in attributes) {
                // programtically created attribute
                if (!_.isString(attributes[k])) {
                    continue;
                }

                val = attributes[k];
                if (val.charAt(0) === '[' || val.charAt(0) === '{') {
                    try {
                        attributes[k] = JSON.parse(val);
                    } catch (e) {
                        LAZO.logger.warn('[lazoWidget] Error while parsing attribute value', e);
                    }
                } else if (_.isNumber(parseFloat(val)) && !_.isNaN(parseFloat(val))) {
                    attributes[k] = parseFloat(val);
                } else if (val === 'true') {
                    attributes[k] = true;
                } else if (val === 'false') {
                    attributes[k] = false;
                }
            }

            return attributes;
        }
941234
def store_attribute(self, key, value):
        """"""
        if key == 'summary' or key == 'filename' or key == 'previous':
            return
        attr = key.replace('-', '_')
        if key.endswith('-time'):
            value = int(value)
        setattr(self, attr, value)
279440
function attr(key, val) {
  var i, attrs, map = {};
  if(!this.length || key !== undefined && !Boolean(key)) {
    return this;
  }

  if(key === undefined && val === undefined) {
    // no args, get all attributes for first element as object
    attrs = this.dom[0].attributes;
    // convert NamedNodeMap to plain object
    for(i = 0;i < attrs.length;i++) {
      // NOTE: nodeValue is deprecated, check support for `value` in IE9!
      map[attrs[i].name] = attrs[i].value;
    }
    return map;
  }else if(typeof key === 'string' && !val) {
    // delete attribute on all matched elements
    if(val === null) {
      this.each(function(el) {
        el.removeAttribute(key);
      })
      return this;
    }
    // get attribute for first matched elements
    return this.dom[0].getAttribute(key);
  // handle object map of attributes
  }else {
    this.each(function(el) {
      if(typeof key === 'object') {
        for(var z in key) {
          if(key[z] === null) {
            el.removeAttribute(z);
            continue;
          }
          el.setAttribute(z, key[z]);
        }
      }else{
        el.setAttribute(key, val);
      }
    });
  }
  return this;
}
55079
function getNameAttributeValue(element) {
	for (let i = 0, len = element.attributes.length; i < len; i++) {
		let attribute = element.attributes[i]

		if (attribute.name === 'name') {
			if (attribute.type !== 'attribute-simple') {
				throw new Error(`name attribute for ${element.name} tag must be a literal value`)
			}
			return attribute.value
		}
	}

	return ''
}
1217202
def getElementsByAttr(self, attrName, attrValue):
        '''
            
        '''
        elements = []
        for child in self.children:
            if child.getAttribute(attrName) == attrValue:
                elements.append(child)
            elements += child.getElementsByAttr(attrName, attrValue)
        return TagCollection(elements)
1277599
def _element_to_bson(key, value, check_keys, opts):
    """"""
    if not isinstance(key, string_type):
        raise InvalidDocument("documents must have only string keys, "
                              "key was %r" % (key,))
    if check_keys:
        if key.startswith("$"):
            raise InvalidDocument("key %r must not start with '$'" % (key,))
        if "." in key:
            raise InvalidDocument("key %r must not contain '.'" % (key,))

    name = _make_name(key)
    return _name_value_to_bson(name, value, check_keys, opts)
322499
function attributes(attrs) {
  attrs = attrs || {};
  var ident = attrs.id || '';
  var classes = attrs.classes || [];
  var keyvals = [];
  Object.keys(attrs).forEach(function (k) {
    if (k !== 'classes' && k !== 'id') keyvals.push([k,attrs[k]]);
  });
  return [ident, classes, keyvals];
}
165383
private boolean processElementAttributes(Element element) {
    Attributes attributes = element.getAttributes();
    if (attributes == null) {
      return false;
    }

    boolean shouldPopContext = false;
    registerMandatoryAttributes(attributes);

    Attribute vForAttribute = attributes.get("v-for");
    Attribute slotScopeAttribute = attributes.get("slot-scope");
    if (vForAttribute != null || slotScopeAttribute != null) {
      // Add a context layer
      shouldPopContext = true;
      context.addContextLayer(vForAttribute != null);
    }

    if (vForAttribute != null) {
      String processedVForValue = processVForValue(vForAttribute.getValue());
      outputDocument.replace(vForAttribute.getValueSegment(), processedVForValue);
    }

    if (slotScopeAttribute != null) {
      String processedScopedSlotValue = processSlotScopeValue(slotScopeAttribute.getValue());
      outputDocument.replace(slotScopeAttribute.getValueSegment(), processedScopedSlotValue);
    }

    Optional<LocalComponent> localComponent = getLocalComponentForElement(element);

    Attribute refAttribute = attributes.get("ref");
    if (refAttribute != null) {
      result.addRef(
          refAttribute.getValue(),
          localComponent.map(LocalComponent::getComponentType)
              .orElse(getTypeFromDOMElement(element)),
          context.isInVFor()
      );
    }

    Map<String, Class<?>> elementPropertiesType = getPropertiesForDOMElement(element)
        .orElse(new HashMap<>());

    // Iterate on element attributes
    Set<LocalComponentProp> foundProps = new HashSet<>();
    for (Attribute attribute : element.getAttributes()) {
      String key = attribute.getKey();
      if ("v-for".equals(key) || "slot-scope".equals(key)) {
        continue;
      }

      if ("v-model".equals(key)) {
        processVModel(attribute);
        continue;
      }

      Optional<LocalComponentProp> optionalProp =
          localComponent.flatMap(lc -> lc.getPropForAttribute(attribute.getName()));
      optionalProp.ifPresent(foundProps::add);

      if (!VUE_ATTR_PATTERN.matcher(key).matches()) {
        optionalProp.ifPresent(this::validateStringPropBinding);
        continue;
      }

      context.setCurrentSegment(attribute);

      currentAttribute = attribute;
      currentProp = optionalProp.orElse(null);
      currentExpressionReturnType = getExpressionReturnTypeForAttribute(attribute,
          elementPropertiesType);
      String processedExpression = processExpression(attribute.getValue());

      if (attribute.getValueSegment() != null) {
        outputDocument.replace(attribute.getValueSegment(), processedExpression);
      }
    }

    localComponent.ifPresent(lc -> validateRequiredProps(lc, foundProps));

    return shouldPopContext;
  }
1058427
function(node) {
        var attributes = {};
        var i, len, data, key;
        var dataNodes = node.getElementsByTagName("Data");
        for (i = 0, len = dataNodes.length; i < len; i++) {
            data = dataNodes[i];
            key = data.getAttribute("name");
            var ed = {};
            var valueNode = data.getElementsByTagName("value");
            if (valueNode.length) {
                ed['value'] = this.getChildValue(valueNode[0]);
            }
            if (this.kvpAttributes) {
                attributes[key] = ed['value'];
            } else {
                var nameNode = data.getElementsByTagName("displayName");
                if (nameNode.length) {
                    ed['displayName'] = this.getChildValue(nameNode[0]);
                }
                attributes[key] = ed;
            } 
        }
        var simpleDataNodes = node.getElementsByTagName("SimpleData");
        for (i = 0, len = simpleDataNodes.length; i < len; i++) {
            var ed = {};
            data = simpleDataNodes[i];
            key = data.getAttribute("name");
            ed['value'] = this.getChildValue(data);
            if (this.kvpAttributes) {
                attributes[key] = ed['value'];
            } else {
                ed['displayName'] = key;
                attributes[key] = ed;
            }
        }
        
        return attributes;    
    }
1082749
function storeTmplItems( content ) {
		var keySuffix = "_" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m;
		for ( i = 0, l = content.length; i < l; i++ ) {
			if ( (elem = content[i]).nodeType !== 1 ) {
				continue;
			}
			elems = elem.getElementsByTagName("*");
			for ( m = elems.length - 1; m >= 0; m-- ) {
				processItemKey( elems[m] );
			}
			processItemKey( elem );
		}
		function processItemKey( el ) {
			var pntKey, pntNode = el, pntItem, tmplItem, key;
			// Ensure that each rendered template inserted into the DOM has its own template item,
			if ( (key = el.getAttribute( tmplItmAtt ))) {
				while ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { }
				if ( pntKey !== key ) {
					// The next ancestor with a _tmplitem expando is on a different key than this one.
					// So this is a top-level element within this template item
					// Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment.
					pntNode = pntNode.parentNode ? (pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0)) : 0;
					if ( !(tmplItem = newTmplItems[key]) ) {
						// The item is for wrapped content, and was copied from the temporary parent wrappedItem.
						tmplItem = wrappedItems[key];
						tmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode], null, true );
						tmplItem.key = ++itemKey;
						newTmplItems[itemKey] = tmplItem;
					}
					if ( cloneIndex ) {
						cloneTmplItem( key );
					}
				}
				el.removeAttribute( tmplItmAtt );
			} else if ( cloneIndex && (tmplItem = jQuery.data( el, "tmplItem" )) ) {
				// This was a rendered element, cloned during append or appendTo etc.
				// TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem.
				cloneTmplItem( tmplItem.key );
				newTmplItems[tmplItem.key] = tmplItem;
				pntNode = jQuery.data( el.parentNode, "tmplItem" );
				pntNode = pntNode ? pntNode.key : 0;
			}
			if ( tmplItem ) {
				pntItem = tmplItem;
				// Find the template item of the parent element. 
				// (Using !=, not !==, since pntItem.key is number, and pntNode may be a string)
				while ( pntItem && pntItem.key != pntNode ) { 
					// Add this element as a top-level node for this rendered template item, as well as for any
					// ancestor items between this item and the item of its parent element
					pntItem.nodes.push( el );
					pntItem = pntItem.parent;
				}
				// Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering...
				delete tmplItem._ctnt;
				delete tmplItem._wrap;
				// Store template item as jQuery data on the element
				jQuery.data( el, "tmplItem", tmplItem );
			}
			function cloneTmplItem( key ) {
				key = key + keySuffix;
				tmplItem = newClonedItems[key] = 
					(newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent, null, true ));
			}
		}
	}
279817
function processHtmlAttributes(input = {}) {
    const attributes = {};
    const htmlAttributes = input.htmlAttributes;
    const wildcardAttributes = input['*'];

    let obj = htmlAttributes || wildcardAttributes;
    if (htmlAttributes && wildcardAttributes) {
        obj = Object.assign(wildcardAttributes, htmlAttributes);
    }

    if (obj) {
        Object.keys(obj).forEach((key) => {
            attributes[camelToKebab(key)] = obj[key];
        });
    }

    return attributes;
}