mithril-n1.0.1 • Public • Published
Pure DOM nodes in Mithril templates.
$ bower install mithril-n
$ npm install mithril-n
It's really just Mithril's
m(), which accepts DOM nodes as
children as well as original arguments.
…will result in:
A happy family
* I'm using ES6 syntax here – brought to us today by great projects like babel. When you download a release of mithril-n, you get two versions bundled: one for ES6, one for ES5 (available as CommonJS, RequireJS and as a global variable).
If you're interested in implementation details, have a look at the annotated source.
Many thanks to this fine gentleman for his invaluable input: