document.createElement replacement