Basic Children

setChildren() declaratively builds native DOM child trees using direct DOM nodes.

DOMPP performs structural mutation directly without virtual DOM diffing or reconciliation engines.

Important

setChildren() replaces the current child structure directly.

DOMPP does not perform virtual DOM reconciliation or structural diffing.

Child trees remain fully native and directly accessible through standard DOM APIs.

Code

const card =
  document
    .createElement("div")
    .setAttributes({
      class: "card"
    })
    .setChildren(
      document
        .createElement("h2")
        .setText(
          "DOM++"
        ),
      document
        .createElement("p")
        .setText(
          "Children are declarative."
        ),
      document
        .createElement("button")
        .setText(
          "Learn More"
        )
    );

app.setChildren(
  card
);
Notes
  • setChildren() works with native DOM nodes directly
  • child trees are built declaratively through chaining
  • no virtual DOM or hidden reconciliation occurs

Live Preview