SutilElement Type
Sutil's element type. This is an abstraction of DOM elements, attributes, events, etc.
The type itself is a function that maps BuildContext
to a SutilEffect
,
wrapped in a private record to isolate users from implementation details as much as possible:
type SutilElement = private { Builder: BuildContext -> SutilEffect }
type SutilElement =
private { Builder: (obj -> obj) }
Examples of SutilElements:
-
Html.div
-
Attr.className
-
Ev.onClick
-
Core.disposeOnUnmount
-
Core.host
Static members
Static member | Description |
Full Usage:
SutilElement.Define(name, children, builder)
Parameters:
string
children : SutilElement seq
builder : BuildContext -> Node
Returns: SutilElement
|
|
Full Usage:
SutilElement.Define(name, builder)
Parameters:
string
builder : BuildContext -> unit
Returns: SutilElement
|
|
Full Usage:
SutilElement.Define(name, builder)
Parameters:
string
builder : BuildContext -> SutilEffect
Returns: SutilElement
|
|
Full Usage:
SutilElement.Define(builder)
Parameters:
BuildContext -> SutilEffect
Returns: SutilElement
|
|