public function removeAttr($name)
{
$names = $this->getNamesList($name);
$this->each(function (\DOMElement $node) use($names) {
/** @noinspection PhpParamsInspection */
$attributes = NULL === $names ? array_keys(iterator_to_array($node->attributes)) : $names;
foreach ($attributes as $attribute) {
if ($node->hasAttribute($attribute)) {
$node->removeAttribute($attribute);
}
}
}, TRUE);
return $this;
}