KScript docs
EN

Components

How a live update works

  1. On the first request, KScript evaluates the <state> defaults and renders the live root. The HTML includes signed state and action arguments.
  2. On an event, the browser sends the state, the event, and any bound input values to the URL that rendered the page. The original GET route and middleware run again when the page comes from a controller.
  3. KScript verifies the route, session, block and action. It checks that the submitted action and fields are still rendered and then runs the handler.
  4. The browser applies the result to that block. Matching DOM nodes stay in place, including correctly keyed rows and independent nested live blocks.

HTML escapes ordinary { expression } output. Signed values are still visible to the browser. Read private data from the server when you need it. Authorize writes and validate input in the action even when a control is normally hidden or disabled.

Edit this page on GitHub