cookieconsent::resource_info (public)
cookieconsent::resource_info [ -version version ]
Defined in packages/cookie-consent/tcl/cookie-consent-procs.tcl
Get information about available version(s) of the cookieconsent packages, either from the local filesystem, or from CDN.
- Switches:
- -version
(optional)- Returns:
- dict containing resourceDir, resourceName, cdn, cdnHost, prefix, cssFiles, jsFiles and extraFiles.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- cookie_consent__setup
Source code: # # If no version of the cookie consent library was specified, # use the name-spaced variable as default. # if {$version eq ""} { set version $::cookieconsent::version } # # Provide paths for loading either via resources or CDN # set resourceDir [acs_package_root_dir cookie-consent/www/resources] set cdn "//cdnjs.cloudflare.com/ajax/libs" # # If the resources are not available locally, these will be # loaded via CDN and the CDN host is set (necessary for CSP). # The returned "prefix" indicates the place, from where the # resource will be loaded. # if {[file exists $resourceDir/$version]} { set prefix /resources/cookie-consent/$version/ set cdnHost "" } else { set prefix $cdn/$version/ set cdnHost cdnjs.cloudflare.com } lappend result resourceName "Cookie Consent Widget" resourceDir $resourceDir cdn $cdn cdnHost $cdnHost prefix $prefix cssFiles {cookieconsent.min.css} jsFiles {cookieconsent.min.js} extraFiles {} return $resultXQL Not present: Generic, PostgreSQL, Oracle