This feature may be a candidate for removal from web standards or browsers.The dynamic markup insertion API, which includes document.write(), has "very idiosyncratic behavior" which can be difficult to debug.