Configuration
Some behavior is decided at boot: debug narration, the $event names the renderer recognizes, its placeholder token. This topic covers the one object that carries those switches — and the helper that extends events at runtime.
AppGlobalConfig Copy link
Boot-time configuration rides in on init's (& hydrate's) globalConfig — see Bootstrapping and Client Hydration:
interface
AppGlobalConfig={ debug?: boolean; debugScope?: ConfigDebugAllowable; events?: string[]; token?: string; }debug&debugScope- Opt-in debug narration switches — see Diagnostics.events- Extra event names appended to the defaults the template renderer recognizes for$eventbindings (equivalent to callingappendEvents, below).token- [Default:'⚡'] The placeholder token the template renderer uses during dynamic value resolution. Change it only if the default could collide with your content.
appendEvents Copy link
appendEvents(eventsToAppend) - The template renderer recognizes $event bindings (see Element bindings) for the standard GlobalEventHandlers set (click, input, change, …). If an event you bind isn't in that list — a custom event, or a newer DOM event — append it before the binding template renders:
import { appendEvents } from '@loom-js/core';
appendEvents(['my-custom-event']);
Inclusion import { appendEvents } from '@loom-js/core';