You might be able to get away with having this template-y code in a `<script type="text/html"></script>` right before the `<script>` tag, and then you could reference it by id. And maybe use knockout. (I don't expect this to happen in this PR.)