|
|
|
|
|
by dmitriid
2573 days ago
|
|
> Isn't that different reduced a lot with ES6+? ES6+ does not replace browser APIs. There's no ES6+ way around this: const el = document.createElement(...)
el.setAttribute(...)
el.classList.toggle(...)
const parent = document.getElementById(...)
parent.appendChild(el)
You either do that in one line of jQuery, or end up writing your own wrappers if you need to do this more than once. |
|
It's more explicit—that will almost always win with me.