public function removeAttr($attr) { foreach ($this->stack(1) as $node) { $loop = $attr == '*' ? $this->getNodeAttrs($node) : array($attr); foreach ($loop as $a) { $oldValue = $node->getAttribute($a); $node->removeAttribute($a); $this->attrEvents($a, $oldValue, null, $node); } } return $this; }