janvladimirmostert
01/01/2020, 8:50 PMMatteo Mirk
01/05/2020, 3:10 PMkotlinx.html
?janvladimirmostert
01/05/2020, 4:20 PMdiv(style = "...") {}
and you'll get a compiler error. This DSL aims to be 100% complete. You can even use deprecated attributes / elements if you enable their generation, but i've excluded them in the generated DSL, if somebody wants them, they can generate them via the generator.
Otherwise the generator allows you to easily add for example bootstrap / foundation attributes and then generate for example a bootstrap specific HTML + Bootstrap DSL whereas in kotlinx.html you'll need to set those attributes via this.bootstrapProperty = ""
Adding custom components is fairly easy with this DSL since you can do snippets which is kinda messy with kotlinx.html
And then something that's being added is the ability to say this element requires this CSS / JS to function correctly, so that when the final page is rendered, even if that requirement is in a snippet, your final page will automatically either generate CSS / JS includes or embed it directly in the page if you prefer.
Finally, since i'm not in control of kotlinx.html, it's much easier to build my own DSL if i'm going to build a whole framework around itMatteo Mirk
01/05/2020, 5:05 PMjanvladimirmostert
01/05/2020, 5:06 PM