The main issue for me is that vscode will incorrectly highlight older templates.js syntax inside of an html tag, but that is mostly gone when you use benchpress syntax.
A vscode plugin for highlighting the benchpress braces would be neat 😄
Re: JQuery in Widget Template
According to this thread, you could load Jquery in a widget template using app.loadJQueryUI(). This doesn't work anymore as that field isn't available at the time the time the widget loads. Is there a way to execute the script as soon as the page finishes loading? It has to be in the template since the code uses variables set in the admin widget panel.
Javascript embedded in the widget can't access the jquery object on page load since jquery hasn't loaded yet. You can use something like this
(function() {
function onLoad() {
// widget code
}
if (window.jQuery) {
onLoad();
} else {
window.addEventListener('DOMContentLoaded', onLoad);
}
})();