use standard document.documentElement.outerHTML for string conversion