public function removeAllAttributes(array $exclusions = [])
    {
        if (!$this->node instanceof DOMElement) {
            return $this;
        }

        foreach ($this->attributes() as $name => $value) {
            if (in_array($name, $exclusions, true)) {
                continue;
            }

            $this->node->removeAttribute($name);
        }

        return $this;
    }
public function removeAllAttributes(array $exclusions = [])
    {
        if (!$this->node instanceof DOMElement) {
            return $this;
        }

        foreach ($this->attributes() as $name => $value) {
            if (in_array($name, $exclusions, true)) {
                continue;
            }

            $this->node->removeAttribute($name);
        }

        return $this;
    }
public function removeAllAttributes ( array $ exclusions = [ ] ) { if ( ! $ this -> node instanceof DOMElement ) { return $ this ; } foreach ( $ this -> attributes ( ) as $ name => $ value ) { if ( in_array ( $ name , $ exclusions , true ) ) { continue ; } $ this -> node -> removeAttribute ( $ name ) ; } return $ this ; }
Unset all attributes of the element.

@param string[] $exclusions

@return \DiDom\Element
Unset all attributes of the element .