Returns a NodeList with attributes for the element.

@method getAttribs
@param {HTMLElement/string} elm Element node or string id to get attributes from.
@return {NodeList} NodeList with attributes.
977766
function (elm) {
        var attrs;

        elm = this.get(elm);

        if (!elm) {
          return [];
        }

        if (isIE) {
          attrs = [];

          // Object will throw exception in IE
          if (elm.nodeName == 'OBJECT') {
            return elm.attributes;
          }

          // IE doesn't keep the selected attribute if you clone option elements
          if (elm.nodeName === 'OPTION' && this.getAttrib(elm, 'selected')) {
            attrs.push({ specified: 1, nodeName: 'selected' });
          }

          // It's crazy that this is faster in IE but it's because it returns all attributes all the time
          var attrRegExp = /<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;
          elm.cloneNode(false).outerHTML.replace(attrRegExp, '').replace(/[\w:\-]+/gi, function (a) {
            attrs.push({ specified: 1, nodeName: a });
          });

          return attrs;
        }

        return elm.attributes;
      }
917528
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(DATE);

        return elements.elements();
    }
676792
function getNodeSlots (element) {
  let nodeSlots = [...element.childNodes]
    .map(node => {
      element.removeChild(node)
      return node
    })

  return nodeSlots
}
520186
function( els ) {

                // "els" is a DOM element
                // http://stackoverflow.com/a/120275/2902821
                if( els instanceof HTMLElement ){
                    return [ els ];
                }

                // "els" is an array
                else if( Array.isArray( els ) ) {
                    return els;
                }

                // "els" is a string
                else if( typeof els === 'string' ) {
                    // Convert Nodelist into an array
                    // http://www.jstips.co/en/converting-a-node-list-to-an-array/
                    return Array.apply( null, document.querySelectorAll( els ) );
                }

                return false;
            }
96175
function getExplicitLabels({ actualNode }) {
	if (!actualNode.id) {
		return [];
	}
	return dom.findElmsInContext({
		elm: 'label',
		attr: 'for',
		value: actualNode.id,
		context: actualNode
	});
}
1255583
function elementGetXMLID(node) {
        return node && 'xml:id' in node.attributes ? node.attributes['xml:id'].value || null : null;
    }
723732
function children(node) {
    var result = [];
    for (var k in node) {
        if (!node.hasOwnProperty(k))
            continue;
        if (k[0] === '$')
            continue;
        var val = node[k];
        if (!val)
            continue;
        if (typeof val === "object" && typeof val.type === "string") {
            result.push(val);
        }
        else if (val instanceof Array) {
            for (var i=0; i<val.length; i++) {
                var elm = val[i];
                if (typeof elm === "object" && typeof elm.type === "string") {
                    result.push(elm);
                }
            }
        } 
    }
    return result;
}
472012
public static String getAttribute( Element node, String key )
    {
        return getAttribute( node, key, null );
    }
1064570
def getElementById(id: str) -> Optional[Node]:
    """"""
    elm = Element._elements_with_id.get(id)
    return elm
313541
function(selector,options) {
      var data = {};
      var elm = this.find(selector);
      if (elm.length) {
        Object.keys(options).forEach(function(key) {
          if (factory.isString(options[key])) {
            data[key] = elm.scrape(options[key]);
          } else {
            data[key] = elm.map(function() {
              return this.scrape(options[key]);
            }).filter(function(item) {
              return Object.keys(item).length;
            });
          }
        });
      }
      return data;
    }
1145666
function( node ){
			var nodeStr = node.outerHTML,
				attrs = [];

			for (var i = 0; i < node.attributes.length; i++) {
				var attr = node.attributes[i];
					attr.indexNum = nodeStr.indexOf(attr.name);

				attrs.push( attr );
			}
			return attrs.sort( modules.utils.sortObjects( 'indexNum' ) );
		}
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;    
    }
407343
def set_attributes(d, elm):
    """"""
    for key in d:
        elm.setAttribute(key, d[key])
187233
function getElements () {
    var elements = {};
    var node = $element[0];

    // gather tab bar elements
    elements.wrapper = node.querySelector('md-tabs-wrapper');
    elements.canvas  = elements.wrapper.querySelector('md-tabs-canvas');
    elements.paging  = elements.canvas.querySelector('md-pagination-wrapper');
    elements.inkBar  = elements.paging.querySelector('md-ink-bar');
    elements.nextButton = node.querySelector('md-next-button');
    elements.prevButton = node.querySelector('md-prev-button');

    elements.contents = node.querySelectorAll('md-tabs-content-wrapper > md-tab-content');
    elements.tabs    = elements.paging.querySelectorAll('md-tab-item');
    elements.dummies = elements.canvas.querySelectorAll('md-dummy-tab');

    return elements;
  }
958960
function (elm) {
        var ctrl, lookup = this.getRoot().controlIdLookup;

        while (elm && lookup) {
          ctrl = lookup[elm.id];
          if (ctrl) {
            break;
          }

          elm = elm.parentNode;
        }

        return ctrl;
      }
861715
function _getLinks(node) {
  var links = [];

  node.ifForEach('inEdgeIds', function (inEdge) {
    var edge = _data.edges.get(inEdge);
    edge.setProperties({
      sourceId: edge.get('inputVertexName'),
      targetId: edge.get('outputVertexName')
    });
    links.push(edge);
  });

  if(node.type === types.INPUT) {
    links.push(Ember.Object.create({
      sourceId: node.get('id'),
      targetId: node.get('vertex.id')
    }));
  }
  else if(node.type === types.OUTPUT) {
    links.push(Ember.Object.create({
      sourceId: node.get('vertex.id'),
      targetId: node.get('id')
    }));
  }

  return links;
}
878283
function getAttributes(attributes) {
		var t = typeof attributes;
		if (t === 'string') {
			return attributes;
		}
		if (t === 'object') {
			return Object.keys(attributes).reduce(function (memo, key) {
				memo.push(key + '="' + attributes[key] + '"');
				return memo;
			}, []).join(' ');
		}
		return '';
	}