Function
Static Public Summary | ||
public |
Compile the given HTML template into a function factory.
|
Static Public
public compile(html: string, options: OPTIONS): function(i: IncrementalDOM, h: Object) source
import {compile} from 'idomizer/src/idomizer.js'
Compile the given HTML template into a function factory.
If the incrementalDOM argument is provided, this function will return a render function. The render function is used with IncrementalDOM.patch.
If the incrementalDOM argument is not provided, this function will return a factory function. The factory function requires the IncrementalDOM library as argument and return the render function..
Basically, when the template is compiled at build time, the IncrementalDOM should not be given. When the template is compiled at runtime, the IncrementalDOM should be given.