template::head::add_javascript (public)
template::head::add_javascript [ -async ] [ -charset charset ] \ [ -crossorigin crossorigin ] [ -defer ] [ -integrity integrity ] \ [ -order order ] [ -script script ] [ -src src ]
Defined in packages/acs-templating/tcl/head-procs.tcl
Add a script of type 'text/javascript' to the head section of the document to be returned to the users client. This function is a wrapper around template::head::add_script. You must supply either src or script.
- Switches:
- -async
(boolean) (optional)- 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
(boolean) (optional)- 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
- -order
(defaults to"0"
) (optional)- specify inclusion order
- -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
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: template::head::add_script -defer=$defer_p -async=$async_p -type text/javascript -src $src -charset $charset -script $script -order $order -crossorigin $crossorigin -integrity $integrityXQL Not present: Generic, PostgreSQL, Oracle