JavaScript
in package
Utility for including JavaScript
Tags
Table of Contents
Methods
- include() : void
- Loads the given local script
Methods
include()
Loads the given local script
public
include(string $filenameWithoutExt) : void
Uses the minified version (.min.js) if available and newer than the plain
version (.js). The query parameter ts
is added to the src
URL,
so the browser will not retrieve out-dated JavaScript from its cache.
Writes the respective <script>
element to $bjs
once,
even when called multiple times with the same argument. The script is
loaded as classic script (i.e. default type
), and with the defer
attribute set.
Parameters
- $filenameWithoutExt : string