setText() is the simplest
DOM++ setter.
It provides a chainable wrapper around
native textContent mutation
while preserving direct DOM access.
setText() mutates the native
DOM node directly and returns the same
element instance for chaining.
const basicText =
document
.createElement("div")
.setAttributes({
class: "card"
})
.setText(
"Hello DOM++"
);
app.setChildren(
basicText
);
setText()
internally mutates
textContent