List of utility methods to do NodeList forEach
forEach(fun)NodeList.prototype.forEach = function(fun) { for (var i=0, elem; elem = this[i]; i++) { fun(elem); } Node.prototype.appendText = function(text) { this.appendChild(this.ownerDocument.createTextNode(text)); function createElem(name,attributes,parent) { var elem = document.createElement(name); for (var i in attributes) elem.setAttribute(i, attributes[i]); ... |