Legend:
Library
Module
Module type
Parameter
Class
Class type
Reactive DOM elements.
Warning. Reactive DOM element mutators (Elr.set_at, Elr.set_children, etc.) and definers (Elr.def_at, Elr.def_children, etc.) use Note loggers to perform their action. To prevent memory leaks, these loggers, and thus their action, automatically get destroyed whenever the element is removed from the HTML DOM.
def_children e cs defines e's children over time with the value of signal cs. Warning. This assumes cs is the only entity interacting with the children.
def_at a v e defines the attribute a of e over time with the value of v. Whenever the signal value is None, the attribute is removed. Warning. This assumes v is the only entity interacting with that attribute.
def_prop p v e defines the property p of e over time with the value of v. Warning. This assumes v is the only entity interacting with that property.
Classes
val set_class : Jstr.t->on:bool Note.event->Brr.El.t-> unit
set_class a ~on e sets the membership of e to class e with the value of on whenever it occurs.
val def_class : Jstr.t->bool Note.signal->Brr.El.t-> unit
rdef_class a b e defines the membership of e to class e over time with the value of b. Warning. This assumes b is the only entity interacting with that class.
def_style p v e sets the inline style property p of e over time with the value of v. Warning. This assumes v is the only entity interacting with that property.
Focus
val set_has_focus : on:bool Note.event->Brr.El.t-> unit
set_focus e ~on sets e's focus with the value of on whenever it occurs.
val def_has_focus : bool Note.signal->Brr.El.t-> unit
def_focus e v defines the focus of e over time with the value of v. Warning. This asumes v is the only entity interacting with e's focus.
Life-cycle callbacks
The browser document is watched for changes via a global MutationObserver. Whenever an element is added in the HTML DOM, its on_add callbacks get called and disposed. Whenever an element is removed from the HTML DOM, on_rem callbacks get called and disposed. A element is deemed part of the HTML DOM if its root node is the browser document.