• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/component_template.php
  • Класс: CBitrixComponentTemplate
  • Вызов: CBitrixComponentTemplate::addExternalJs
public function addExternalJs($jsPath)
{
	/** @global CMain $APPLICATION */
	global $APPLICATION;
	$this->externalJs[] = $jsPath;
	$APPLICATION->AddHeadScript($jsPath);
	//Check if parent component exists and plug js it to it's "collection"
	if($this->__component && $this->__component->__parent)
		$this->__component->__parent->addChildJS($jsPath);
}