Avoid `Unkown runtime error` on IE8 script tag

It seems that setting innerHTML of raw text elements or manipulating child nodes can trigger `Unknown runtime error` in IE8.