![]()
Checks that the rendered HTML does not start with an invalid tag that would
likely cause unexpected output from renderAsElement or renderAsFragment.
See
http://www.w3.org/TR/html5/semantics.html#semantics for reference
as to which HTML elements can be parents of each other.
Arguments:
|
code » | |||||
Ensures the result is "safe" to insert as HTML.
Note if the template has non-strict autoescape, the guarantees here are very
weak. It is recommended applications switch to requiring strict
autoescaping over time by tweaking goog.soy.REQUIRE_STRICT_AUTOESCAPE.
In the case the argument is a SanitizedContent object, it either must
already be of kind HTML, or if it is kind="text", the output will be HTML
escaped.
Arguments:
Returns: string
The assumed-safe HTML output string.
|
code » | |||||
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.
Arguments:
Returns: !Element
Rendered template contents, wrapped in a parent DIV
element if necessary.
|
code » | |||||
Renders a Soy template into a single node or a document
fragment. If the rendered HTML string represents a single node, then that
node is returned (note that this is *not* a fragment, despite them name of
the method). Otherwise a document fragment is returned containing the
rendered nodes.
Arguments:
Returns: !Node
The resulting node or document fragment.
|
code » | |||||
![]()
Renders a Soy template and then set the output string as
the innerHTML of an element. It is recommended to use this helper function
instead of directly setting innerHTML in your hand-written code, so that it
will be easier to audit the code for cross-site scripting vulnerabilities.
Arguments:
|
code » |