public addJavaScript ( $name, $script, $args = [] ) | ||
$name | string Unique name for the script | |
$script | string The script to be included. Should be a URL or, if the `inline` argument is included, script data to be output. | |
$args | array Key/value array defining display details `priority` int The order in which to print this script. Default: STYLE_SEQUENCE_NORMAL `contexts` string|array Where the script should be loaded. Default: array('frontend') `inline` bool Whether the $script value should be output directly as script data. Used to pass backend data to the scripts. |