https://kotlinlang.org logo
Title
h

Hamza

06/20/2018, 4:12 AM
hey everyone 👋. Does anyone know a way (using kotlinx.html) to make a method that returns a html element? I can’t just do
fun DIV.foo() = form {}
as it returns Unit
s

spand

06/20/2018, 7:40 AM
what is your usecase?
h

Hamza

06/20/2018, 7:41 AM
kind of like templating html
like in apache velocity, you can parse another file with
#parse("path-to-file")
h

Hamza

06/20/2018, 7:44 AM
nope! I’ll take a look now
ah, so i should be thinking about it in the oposite way
s

spand

06/20/2018, 7:51 AM
Its a different way of thinking yes
I think @orangy also made a small library for templating but I cannot find it again
h

Hamza

06/20/2018, 8:00 AM
This page was perfect. Thank you!
o

orangy

06/20/2018, 8:51 AM
It’s in ktor now, but it’s a single file