Documentation menu

Client API

Goldar’s client entry points contain optional, side-effect-free browser capabilities. Importing a client module does not attach listeners, query the document, or register Custom Elements. A route that does not require browser behavior does not need to load this package.

Custom Elements

goldar/client/custom-elements exports registerCustomElement(name, elementClass):

import { registerCustomElement } from "goldar/client/custom-elements";
import TodoInput from "./goldar-todo-input.js";

registerCustomElement("goldar-todo-input", TodoInput);

The function registers an absent tag, does nothing when the same constructor is already registered, and throws when the tag belongs to a different constructor. Compiler-generated component modules use this behavior to remain safe when shared layouts and routes request the same component.

The entry point has no server, compiler, routing, rendering, or Hono dependencies. Goldar does not currently expose client navigation, enhanced-form, store, hydration, or transition APIs.