And even before that in Scala (e.g., Scalatags).
Even before that in Java with GWT.
Any programming language can be used to produce HTML, but here – with Scala, Kotlin and Swift – we're talking about something more specific: using an internal DSL to write concise, simple and somewhat declarative code that describes the HTML tree.
Java definitely can't (reasonably, sensibly, practically) do that. GWT seems to be using XML from what I can tell: http://www.gwtproject.org/doc/latest/polymer-tutorial/widget...
This technique has been here for a while with Kotlin and its kotlinx.html library: https://github.com/Kotlin/kotlinx.html#dom
I used it recently on a small project (server-side on the JVM) and might use it the client-side as well (compiled to JS) – you can implement adapters to integrate with your JS framework of choice.