diff --git a/mercurial/templates/static/mercurial.js b/mercurial/templates/static/mercurial.js --- a/mercurial/templates/static/mercurial.js +++ b/mercurial/templates/static/mercurial.js @@ -328,3 +328,9 @@ function makeRequest(url, method, onstar onstart(); return xfr; } + +function docFromHTML(html) { + var doc = document.implementation.createHTMLDocument(''); + doc.documentElement.innerHTML = html; + return doc; +}