We define a representation of HTML trees including widget components.
A HTML tree which may contain widget components.
- element : String → Array (String × Lean.Json) → Array Html → Html
An
element "tag" attrs childrenrepresents<tag {...attrs}>{...children}</tag>. - text : String → Html
Raw HTML text.
- component : UInt64 → String → LazyEncodable Lean.Json → Array Html → Html
A
component h e props childrenrepresents<Foo {...props}>{...children}</Foo>, whereFoo : Component Propsis some component such thath = hash Foo.javascript,e = Foo.«export», andpropswill produce a JSON-encoded value of typeProps.
Instances For
@[instance_reducible]
def ProofWidgets.Html.ofComponent {Props : Type} [Lean.Server.RpcEncodable Props] (c : Component Props) (props : Props) (children : Array Html) :