I had to read with some astonishment that the practice of many tutorials to put Java Script inside the body of the HTML document is really bad practice and might even be the reason for some of the things I hate so much in web-apps or on webpages.
As noted in my article
I am looking for a good and compact way to facilitate HTML Preview with my different ideas. The goal would be two fold:
Generate good and nice HTML documents (with much Java Script)
Have simple and compact templates in the Draft action (with template tags)
As I read the article about the EventListener the practice of Java Script in the body could be completely abandoned by using the load event.
During generation the HTML Preview is not very talkative if a parse/specific error occurs. The EventListenererror event might be a nice way to give the developer more details on the reason of the script.
Again: I suggest to talk about the effect(s) you want to achieve with JS.
JQuery was bloatware and considered a bad example by many JS aficionados.
It is a performance bottleneck, especially with mobile devices. Not necessarily bad code. In the context of Drafts, it might not be an issue at all, since JS is probably only used to get a nice printout. As in your example about nomnoml and mine about code highlighting.