Files
launcher/vdom/vdom_wbtest.mbt
T
SpriteandClaude Sonnet 5.5 17f81c60c8 moon fmt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 01:08:53 +00:00

19 lines
393 B
MoonBit

///|
test "to_html" {
let n : Node[Int32] = el(
"div",
classes=["a", cls_if("b", false), cls_if("c", true)],
handlers={ ..Handlers::none(), tap: Some(1), },
children=[el("span", children=[text("x < y")]), text("tail")],
)
inspect(
to_html(n),
content=(
#|<div class="a c" on="tap">
#| <span>x &lt; y</span>
#| tail
#|</div>
),
)
}