News for hackers. Stuff that matters.
Re:Two techniques for massively faster JavaScript by axod on Monday April 27, 2009 @12:51PM (#581595)
My point was that having to escape things like open close tags, ampersands etc looks horrible and ugly. HTML entities inside HTML code inside strings isn't something I enjoy looking at.

(My example code shows some HTML code as plain text, which needs htmlEntities when using innerHTML).

You can't put anything in nodeValue apart from a string value. But the good thing is, it's just a string. No security issues, no entity encoding, no html tag issues.

Re:Two techniques for massively faster JavaScript by willwagner on Monday April 27, 2009 @01:27PM (#581667)
I see your point; I misread it first time around. From a security point of view for user content, nodeValue is a much better approach.