News for hackers. Stuff that matters.
Re:Vanilla JS, fast, lightweight, cross-platform framework by aaronblohowiak on Sunday August 26, 2012 @02:37PM (#4435807)
innerHTML is an easy one, try setting an attribute -- you have to create a new attribute node, set its value and then add that to the element..
Re:Vanilla JS, fast, lightweight, cross-platform framework by masklinn on Sunday August 26, 2012 @05:40PM (#4436325)
> you have to create a new attribute node, set its value and then add that to the element..

Erm... no you don't: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-F68F082

Re:Vanilla JS, fast, lightweight, cross-platform framework by gildas on Sunday August 26, 2012 @06:48PM (#4436552)
You should set the node property instead (e.g. standard textContent or innerText). It will work everywhere.
Re:Vanilla JS, fast, lightweight, cross-platform framework by mibbitier on Sunday August 26, 2012 @02:59PM (#4435892)
setAttribute()?
Re:Vanilla JS, fast, lightweight, cross-platform framework by aaronblohowiak on Sunday August 26, 2012 @05:57PM (#4436381)
IE8 =(