htmx asks the server for a part of the page and swaps the answer in - HTML over the wire, no JavaScript of your own. A PAD template already has names on its parts: every {fragment} can be asked for alone, so the template that renders the first visit also answers every question htmx asks after it.

<input name="q" hx-get="?products" hx-trigger="input changed delay:300ms" hx-target="#results">

<ul id="results">
  {fragment 'results'}
    {products}<li>{$name}</li>{/products}
  {/fragment}
</ul>

Which part answers

Posts and forms

Pushed by the server

padSse() (Server sent events) streams events; with htmx's sse extension (hx-ext="sse" sse-connect="?ticker") every event's HTML is swapped in as it arrives.

The htmx application shows all of it, each example with its template and PHP: htmx - active search, lazy loading, infinite scroll, inline editing, forms, out-of-band updates and server-sent events.