The aui:script
tag is a JSP tag that loads JavaScript on the page, while
ensuring that certain resources are loaded before executing.
The aui:script
tag supports the following options:
Option | Description |
---|---|
require | Requires an AMD module to load with the Liferay AMD Module Loader. |
use | Uses an AlloyUI/YUI module that is loaded via the YUI loader. |
position | The position the script tag is put on the page. Possible options are inline or auto . |
sandbox | Whether to wrap the script tag in an anonymous function. If set to true , in addition to the wrapping, $ and _ are defined for jQuery and underscore. |
This section covers how to load ES2015, Metal.js, and AUI modules with the AUI script tag.