• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/dom/styleinliner.php
  • Класс: BitrixMainWebDOMStyleInliner
  • Вызов: StyleInliner::inlineDocument
static function inlineDocument(Document $document, array $styleList = null)
{
	if(!$styleList)
	{
		$styleList = CssParser::parseDocument($document, true);
	}

	foreach($styleList as $rule)
	{
		$nodeList = $document->querySelectorAll($rule['SELECTOR']);
		foreach($nodeList as $node)
		{
			static::setStyle($node, $rule['STYLE'], true);
		}
	}
}