Given files A.js and B.js and a WebScript template containing the following:
<@scriptsrc="${url.context}/res/A.js"group="calc"/> <@inlineScript group="calc"> // A comment between imports </@> <@script src="${url.context}/res/B.js" group="calc">
When the final page is rendered in the source you would see an import like this:
<script type="text/javascript" src="/share/res/A.js"></script> <script type="text/javascript">//<![CDATA[ // A comment between imports //]]></script> <script type="text/javascript" src="/share/res/B.js"></script>
Note that the JavaScript from the <@inlineScript> directive is placed between the two imports because they are in the same group. The same is true for any custom directive that outputs JavaScript, for example the <@createWidgets> directive.