This question has been answered by BobRay. See the first response.
Often it uses a default tpl that will add the html around the output.This would be great but i haven't seen any tpl or chunk associated with it. Believe this is a built-in function in the core files
<?php return $modx->regClientScript('assets/templates/.../js/custom.js');
$modx->regClientScript($modx->getChunk('chunkname'));
<script src="assets/templates/.../js/custom.js"></script>
return $modx->regClientScript($modx->getChunk('customjs'));