Open smfoote opened 9 years ago
The new version of the compiler allows us to compile to whatever we want (or compile to one language in different ways). We should consider this as a part of our SSR discussion.
Although simple-dom
doesn't support innerHTML
and outerHTML
, it does have a method for turning an HTML Node into a string: HTMLSerializer#serialize
.
An example of how to implement innerHTML
using serializer can be found in the Riot project
A working version of SSR can be found at #102
Tornado templates should be able to render on the server with Node. There are Node implementations of the DOM API (e.g. simple-dom) that should get us most of the way there, but there are still a few things lacking.
innerHTML
property, which is used within the Tornado runtime, and seems like the easiest way to turn the DOM returned by Tornado into a string.