Scirpts and CSS are provided through tags in the plugin.xml file of your plugin. Below is a declaration registering a script and css file to be loaded in the User Console:
<external-resources> <file context="mantle">content/my-plugin/resources/plugins/mantle_script.js</file> <file context="mantle">content/my-plugin/resources/plugins/mantle_styles.css</file> </external-resources>
The User Console is the only non-plugin area of the platform that participates in this system. You’ll note that it’s context name is “mantle”. For plugins the name of the context should be the id of the plugin.
Similar to the Theme System, provided Scripts and CSS are injected automatically into web-pages by including the webcontext.js script tag in the head of the page: