template::add_body_script (public)
template::add_body_script [ -async ] [ -charset charset ] \ [ -crossorigin crossorigin ] [ -defer ] [ -integrity integrity ] \ [ -script script ] [ -src src ] [ -type type ]
Defined in packages/acs-templating/tcl/head-procs.tcl
Add a script to the start of the body section of the document to be returned to the users client. You must supply either src or script.
- Switches:
- -async (optional, boolean)
- whether execution of the script should be executed asynchronously as soon as it is available
- -charset (optional)
- the charset attribute of the script tag, i.e. the character set of the script if it differs from the main document
- -crossorigin (optional)
- Enumerated attribute to indicate whether CORS (Cross-Origin Resource Sharing) should be used
- -defer (optional, boolean)
- whether execution of the script should be deferred until after the page has been loaded
- -integrity (optional)
- provide hash values for W3C Subresource Integrity recommendation
- -script (optional)
- the inline script for the body of the script tag. This parameter will be ignored if a value has been supplied for src
- -src (optional)
- the src attribute of the script tag, i.e. the source url of the script
- -type (optional, defaults to
"text/javascript"
)- the type attribute of the script tag, e.g. 'text/javascript'
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- templates_and_scripts, xowiki_test_cases