Hacker News new | ask | show | jobs
by masklinn 4081 days ago
The DOM API remains complete garbage unless you're operating readonly on a single node (then it's merely bad).
1 comments

Do you have any examples? In my opinion the DOM API only sucked pre-IE9 because of all the inconsistencies and incompatibilities.

I have dropped jQuery completely except for when I need some of its plugins because I end up having to access the internal DOM objects too often and using $el.get(0) all over the place is ugly and a PITA.

    $('.something').toggleClass('collapsed')
                   .click(somethingClicked);
This simple and readable statement will turn into a lot of lines with DOM API.