goog.soy.Renderer
Classgoog.soy.Renderer(opt_injectedDataSupplier, opt_domHelper)
Creates a new soy renderer. Note that the renderer will only be guaranteed to work correctly within the document scope provided in the DOM helper.
opt_injectedDataSupplier
{goog.soy.InjectedDataSupplier
=}
opt_domHelper
{goog.dom.DomHelper
=}
.render(template, opt_templateData)
Renders a Soy template and returns the output string.
template
{Function
}
opt_templateData
{Object
=}
string
}
.renderAsElement(template, opt_templateData)
Renders a Soy template into a single node. If the rendered HTML string represents a single node, then that node is returned. Otherwise, a DIV element is returned containing the rendered nodes. Delegates to {@code goog.soy.renderAsElement}.
template
{Function
}
opt_templateData
{Object
=}
Element
}
.renderAsFragment(template, opt_templateData)
Renders a Soy template into a single node or a document fragment. Delegates to {@code goog.soy.renderAsFragment}.
template
{Function
}
opt_templateData
{Object
=}
Node
}
.renderElement(element, template, opt_templateData)
Renders a Soy template and then set the output string as the innerHTML of the given element. Delegates to {@code goog.soy.renderElement}.
element
{Element
}
template
{Function
}
opt_templateData
{Object
=}