public
Description: PURE Unobtrusive Rendering Engine for HTML
Home | Edit | New

pure.compile method

This is the method that will convert the HTML to a Javascript function.

pure.compile(html, fName [, context, noEval ] )

Parameters:





html

DOM


This is the HTML template we want to compile


fName
String


Is the name we want to give to the compiled template


context (optional)

Object

If we want to use the auto-rendering, the context needs to be passed for the compilation

noEval (optional)

boolean
The compiled JS function is evaluated by default. If TRUE, only the JS source-code will be returned and not evaluated.

Output:


string
JS codeThe source code of the HTML template converted to the Javascript function is returned.

Note:

See how you can compile your html’s and optimize your response time

Last edited by pure, Tue Sep 16 11:53:25 -0700 2008
Home | Edit | New
Versions: