docs: function _getElementsByAttribute(result, check_value, element, name, value) {
  
  	if (typeof element == 'string' || element.nodeType != 1) {
  		return;
  	}
  
  	let children,
  	    child,
  	    i;
  
  	if (Array.isArray(element)) {
  		children = element;
  	} else {
  		children = element.children;
  	}
  
  	for (i = 0; i < children.length; i++) {
  		child = children[i];
  
  		if (!child || !child.hasAttribute) {
  			continue;
  		}
  
  		if (child.hasAttribute(name)) {
  			if (!check_value || child.getAttribute(name) == value) {
  				result.push(child);
  			}
  		}
  
  		_getElementsByAttribute(result, check_value, child, name, value);
  	}
  
  	return result;
  }