mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
+6
-1
@@ -99,7 +99,12 @@ export function renderToDOM(
|
||||
* Note that the result of renderToString is guaranteed to be the same as the
|
||||
* one from QWeb.
|
||||
*/
|
||||
export function renderToString(qweb: QWeb, t: string, context: EvalContext = {}, extra?: any): string {
|
||||
export function renderToString(
|
||||
qweb: QWeb,
|
||||
t: string,
|
||||
context: EvalContext = {},
|
||||
extra?: any
|
||||
): string {
|
||||
const node = renderToDOM(qweb, t, context, extra);
|
||||
const result = node instanceof Text ? node.textContent! : node.outerHTML;
|
||||
if (result !== qweb.renderToString(t, context, extra)) {
|
||||
|
||||
Reference in New Issue
Block a user