hgweb: add appendFormatHTML javascript function
This is a convenient helper function to append some formatted HTML markup to a
DOM element.
--- a/mercurial/templates/static/mercurial.js Fri Sep 06 13:30:58 2013 +0400
+++ b/mercurial/templates/static/mercurial.js Fri Sep 06 13:30:58 2013 +0400
@@ -341,3 +341,7 @@
doc.documentElement.innerHTML = html;
return doc;
}
+
+function appendFormatHTML(element, formatStr, replacements) {
+ element.insertAdjacentHTML('beforeend', format(formatStr, replacements));
+}