I\'m adding a few thousand rows to a table so i need the speed of native javascript for this one.
Currently I\'m using:
nThName = document.createElement(
This can be done, as an example:
document.body.appendChild(
document.createElement('div').appendChild(
document.createTextNode('hello')
).parentNode
);
JS Fiddle representative demo.
I think it's just your approach to chaining that was off; given your specific demo code:
nTr.appendChild(
document.createElement('th').appendChild(
document.createTextNode(workers[i].name)
).parentNode
);
The white-space here isn't essential, it's simply to more-clearly show what goes where.