I am currently using document.write to inject html into my framework. I'm using Backbone, Marionette, require.js, jQuery.
I want to avoid using document.write since it has performance and browser impacts.
Please suggest an alternative.
My current code:
var html = this.compilePageHtml(); //We get some HTML code
this._previewWindow = window.open("about:blank", "PreviewWindow","width=320, height=570, scrollbars=yes" );
this._previewWindow.document.write(html); //Loads HTML in new window popup