News for hackers. Stuff that matters.
Re:W3C, you ignorant slut by daleharvey on Wednesday September 30, 2009 @11:29AM (#852608)
the dom is a terribly designed api, it has to be one of the worst apis I have ever used

to change a nodeName, you have to clone its children and replicate its attributes.

to delete on object,

object.parentNode.removeChild(object);

to insert after an element

object.parentNode.insertBefore(newObject, object.nextSibling);

and that only works by auto'magic' nonsense.

things like jquery would still be around if the browser all implemented everything nicely because the dom api is just terrible

There are no comments on this comment yet.