Skip to content

Commit

Permalink
use domInnerHtml for now
Browse files Browse the repository at this point in the history
Signed-off-by: George Lemon <[email protected]>
  • Loading branch information
georgelemon committed Aug 29, 2024
1 parent 5b884b0 commit 07c90a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/timpkg/engine/compilers/html.nim
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const
domSetAttribute = "$1.setAttribute('$2','$3');"
domInsertAdjacentElement = "$1.insertAdjacentElement('beforeend',$2);"
domInnerText = "$1.innerText=\"$2\";"
domInnerHtml = "$1.innerHTML=`$2`;"
stdlibPaths = ["std/system", "std/strings", "std/arrays", "std/os", "*"]

# Scope API, available for library version of TimEngine
Expand Down Expand Up @@ -2007,7 +2008,8 @@ proc walkNodes(c: var HtmlCompiler, nodes: seq[Node],
if not c.isClientSide:
write x, true, node.identSafe
else:
add c.jsOutputCode, domInnerText % [xel, c.toString(x, scopetables)]
# add c.jsOutputCode, domInnerText % [xel, c.toString(x, scopetables)]
add c.jsOutputCode, domInnerHtml % [xel, c.toString(x, scopetables)]
of ntDotExpr: writeDotExpression()
of ntBracketExpr: writeBracketExpr()
of ntVariableDef:
Expand Down

0 comments on commit 07c90a6

Please sign in to comment.