You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't had a ton of time to dig into this library but it looks like a pretty solid templating language. I was wondering if there are any effort to support virtual DOM Esq output similar to JSX?
The text was updated successfully, but these errors were encountered:
@DylanPiercey I hadn't thought about compiling HTML to JavaScript code that builds a DOM but that would be possible and you could use htmljs-parser to do that. That's an interesting use case. This parser is generic enough such that it could be used by other libraries to compile to different output formats.
For example, if you wanted to compile HTML to React JS code you could take something like this:
htmljs-parser will be used by http://markojs.com/ to compile Marko templates in the next major version (work in progress). Marko currently supports pure HTML-based templates but we want to enhance it to recognize JavaScript expressions. See marko-js/marko#90
Marko templates basically compile to a function that produces an HTML string but it would be interesting to considering creating an alternate compiled output that creates the DOM elements via JavaScript code.
@DylanPiercey Just doing some issue cleanup. Since this is just a parser you could definitely use it as part of a compiler that produce virtual DOM output. I'm closing this issue, but if you have any thoughts or questions please feel free to add them here or open another issue.
I haven't had a ton of time to dig into this library but it looks like a pretty solid templating language. I was wondering if there are any effort to support virtual DOM Esq output similar to JSX?
The text was updated successfully, but these errors were encountered: