Back to Behavior class

Method core

public static void
core
()
Method to load core.js into the document head.
Returns
  • void
Since
  • 3.3
Deprecated
  • 5.0
Class: Behavior
Project: Joomla

Method core - Source code

/**
 * Method to load core.js into the document head.
 *
 * Core.js defines the 'Joomla' namespace and contains functions which are used across extensions
 *
 * @return  void
 *
 * @since   3.3
 *
 * @deprecated 5.0  Use Joomla\CMS\WebAsset\WebAssetManager::enable();
 */
public static function core()
{
    Factory::getApplication()->getDocument()->getWebAssetManager()->useScript('core');
}