Yes. With JavaScript, it's even better because I can detect the environment at runtime and then inject the appropriate code vs. having to remember to upload the appropriate "css importer". There is a little more code that runs during setup to do the environment detection, differentiating between my local instance of canvas, our dev instance, test, and then of course the production instance, but the final step is the most important and easy.
Something like this (I use ES2015 syntax and transpile with Babel to ES5):
AppInjector.js:
injectScript(scriptUrl) {
console.log('%s: START-Inject: %s', this.cid, scriptUrl);
let thisObj = this;
let head = document.getElementsByTagName('head')[0];
let script = document.createElement('script');
script.setAttribute('data-id', 'app');
script.type = 'text/javascript';
script.src = scriptUrl;
script.onload = function() {
console.log('%s: COMPLETE-Inject: %s', thisObj.cid, scriptUrl);
};
script.onerror = function() {
console.log('%s: ERROR-Inject: %s', thisObj.cid, scriptUrl);
};
head.appendChild(script);
}