Hacker News new | ask | show | jobs
by arp242 1105 days ago
I like being able to do elem.remove() instead of elem.parentNode.removeChild(elem), and elem.prepend(other) instead of elem.insertAdjacentElement('afterbegin', other). There's loads of stuff like this.

The DOM API does not spark joy.

1 comments

Ah cheers, I didn't know that. I'll have to take a look.