WebAssembly.Builder

Provide context for using the elements DSL (WebAssembly.DSL) and possibly HTML macros (WebAssembly.HTML module).

Summary

build(expr)
builder(do_block)

Generate iolist from HTML elements given in a block with the DSL

Macros

build(expr)
builder(do_block)

Generate iolist from HTML elements given in a block with the DSL.

Code being run in the block can be split into different fuctions (this is an equivalent of partial templates). Builder is guaranteed to work as long as calls happen in the same Erlang process, which is typical for the intended use (webapp controllers/handlers).