How to pass values to HtmlDialog?

Javascript is OK if the dialog is small but once you start even basic stuff it becomes a pain. So of course we can work with what Javascript offers but that is akin to saying we can write C instead of Ruby. Possible, but cumbersome. I don’t think including jquery will bloat Sketchup and not every dialog needs to load it (which would also not bloat anything too much), it can be simply a path in SU which the html can reference.