• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/dom/element.php
  • Класс: BitrixMainWebDOMElement
  • Вызов: Element::setAttribute
public function setAttribute($name, $value)
{
	$attr = $this->getAttributeNode($name);
	if(!$attr)
	{
		$attr = $this->ownerDocument->createAttribute($name, $value);
	}
	else
	{
		$attr->setValue($value);
	}

	$this->setAttributeNode($attr);
}