I am using Chris Ganger’s crate library to generate html on the client side.
(defpartial html [] form)
(def form
[:div.form-horizontal
[:fieldset
[:legend "Student Registeration"]
[:div.control-group
[:label.control-label "Hello World"]]])
When I execute the above function in in clojurescript repl (html) I get #<[object HTMLDivElement]>.
However when I execute it as (.log js/console (html)), the proper generated html is logged into the browser’s console.
How do I get it to return a HTML string instead of an object?
Thanks,
Murtaza
The object is an Dom Element object for the DIV element. You can use “outerHTML” property of this DOM element to get its string representation.