
2026-10-05

ignition

initially stateless
data-for loops;
handlers need to know which model was rendered to the dom that triggered the event.
this *can* be accomplished by rendering `model.id` into `data-id` attribute,
then searching up to the appropriate node `.closest( "[data-id]" )` ..
but relying on the dom in application code like this feels bad /wrong.
..
the fact that events are triggered on otherwise identical elements
and that the [rendered] model is needed in that handler demonstrates the need for *state*.
..
one option is to add a `WeakMap` to each root template-instance,
and on each *render*, `.put( .dom(), model )`.
this would allow a similar `.closest()` approach manually..
but better, handlers can have `this` set as the event instead of the `event.target` like
`handler.call( event, arguments )` and arguments could be the relevent /last-rendered model based on the `WeakMap` instance
..
alternatively, a template-instance could record a model directly..
record the model on creation ( `constructor( model )`, `.instance( model )` )
or before rendering the node ( `.dom( model )` ).
.. feels slightly weird given the stateless origins..
but event handlers require state; so *how* best ?

.. this whole "recording model state"
- is against the origins of minimalism
- enables event listeners
..
then why avoid event listeners; if state is added, then what *all* can it offer ?
..
@click="%myhandler"
event.target.value
templateInstance.dom() // yeah, i don't like the idea of requiring passing the model for the dom..
templateInstance.model() // last rendered model on this instance, the "state"
.. `lambdas[ "%myhandler" ].call( event /* this */, instance /* dom, model */ );`
note: `fn.call( that, ...args )` == `fn.apply( that, [ ...args ] )`



TODO
split attr-ctrl-points
to attritbute-ctrl-points & property-ctrl-points
unsupported boolean attributes
simplify the property-ctrl-points, not expr just string value
special cased `readOnly` property

data-for does the same that would be done manually
data-for prompts the issue of event delegation; many identical event handlers is inefficient
capture vs bubbling; focus/blur vs focusin/focusout, etc.

router
parse, string, handle, go
independent of rendering library

TODO
git snapshot !

----

ideas
static content server
webdav files vs database entries
csp "content-security policy" for "static" content directory,
allowed extensions: txt, rst, md, bin, jpg, png, jxl
disallowed mime-types: js, wasm, svg, html, (css?)
storage: localstorage, indexeddb, server storage ( async/await, promises )
offline, service worker
scaling sizes: precise, exponential presets, original, filesize
scaling on width vs height vs aspect-ratio..
..
language design
wuffs, dsl, ecosystem compilation, native headers

pokemon
trozei images


