template::add_script (public)

 template::add_script [ -async ] [ -charset charset ] \
    [ -crossorigin crossorigin ] [ -defer ] [ -integrity integrity ] \
    [ -order order ] [ -script script ] [ -section section ] \
    [ -src src ] [ -type type ]

Defined in packages/acs-templating/tcl/head-procs.tcl

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
-order (optional, defaults to "0")
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
-section (optional, defaults to "head")
section, where script is added ("head" or "body")
-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):
%3 Class ::xowiki::formfield::FormField Class ::xowiki::formfield::FormField (public) template::add_script template::add_script Class ::xowiki::formfield::FormField->template::add_script Class ::xowiki::formfield::numeric Class ::xowiki::formfield::numeric (public) Class ::xowiki::formfield::numeric->template::add_script packages/acs-bootstrap-installer/installer/www/blank-master.tcl packages/acs-bootstrap-installer/ installer/www/blank-master.tcl packages/acs-bootstrap-installer/installer/www/blank-master.tcl->template::add_script richtext::ckeditor4::initialize_widget richtext::ckeditor4::initialize_widget (public) richtext::ckeditor4::initialize_widget->template::add_script richtext::ckeditor5::initialize_widget richtext::ckeditor5::initialize_widget (public) richtext::ckeditor5::initialize_widget->template::add_script template::add_body_script template::add_body_script (public) template::add_script->template::add_body_script template::head::add_script template::head::add_script (public) template::add_script->template::head::add_script

Testcases:
No testcase defined.
Source code:

    if {$section eq "head"} {
        #
        # A head script
        #
        ::template::head::add_script -type $type -defer=$defer_p -async=$async_p  -src $src -charset $charset -script $script -order $order  -crossorigin $crossorigin -integrity $integrity
    } else {
        #
        # A body script. The order is ignored.
        #
        ::template::add_body_script -type $type -defer=$defer_p -async=$async_p  -src $src -charset $charset -script $script  -crossorigin $crossorigin -integrity $integrity
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: