cookieconsent::add_to_page (public)
cookieconsent::add_to_page [ -version version ] object
Defined in packages/cookie-consent/tcl/cookie-consent-procs.tcl
Add the necessary CSS, JavaScript and CSP to the current page.
- Switches:
- -version (optional)
- Parameters:
- object (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- cookie_consent__setup
Source code: set resource_info [resource_info -version $version] if {[dict exists $resource_info cdnHost] && [dict get $resource_info cdnHost] ne ""} { security::csp::require script-src [dict get $resource_info cdnHost] security::csp::require style-src [dict get $resource_info cdnHost] } set prefix [dict get $resource_info prefix] foreach cssFile [dict get $resource_info cssFiles] { template::head::add_css -href $prefix/$cssFile } foreach jsFile [dict get $resource_info jsFiles] { template::head::add_javascript -src $prefix/$jsFile } ::template::add_body_script -script [$object render_js]XQL Not present: Generic, PostgreSQL, Oracle