Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 764 Bytes

README.md

File metadata and controls

24 lines (16 loc) · 764 Bytes

Coconut HTML backend

A special coconut backend to render plain HTML, for use in static generators and server side rendering.

Usage:

coconut.html.Renderer.render('
  <div>Hello world!</div>
');

This will give you a tink.HtmlString, which you can serve, dump into a file, or process in any other way you may see fit.

Code removal

Because coconut.html can run on any platform, it removes quite a bit of code intended for client side use:

  • DOM event handlers
  • refs
  • life cycle callbacks
  • any fields annotated with @:clientside

All the removed code is not type checked, so that views which compile fine for the server may produce errors when you switch to client.