Hi,
I am not sure whether this is supposed to be supported or not:
(defn set-application []
(let [content (ef/html [:div [:h1 "Testing"]
[:button {:onclick #(.log js/console "TESTING")} "Test it!"]])]
(ef/at ["#application"] (ef/content content))))
Anyway the onclick function is broken and does not work in chromium nor in firefox. In both I get "Uncaught SyntaxError: Unexpected token (" . pointing just to the first line of my index.html without decent explanation (and I have the .js.map file in place).
The generated html looks like this:
<div>
<h1>Testing</h1>
<button onclick="function (){return console.log("Hi there!")}">Test it!</button>
</div>
This inlined js is clearly broken (at the very least something like "(function () {...})()" -wrapping is missing). Anyway supporting embedded event handlers would be a powerful feature.
Hi,
I am not sure whether this is supposed to be supported or not:
Anyway the onclick function is broken and does not work in chromium nor in firefox. In both I get "Uncaught SyntaxError: Unexpected token (" .
pointing just to the first line of my index.html without decent explanation (and I have the .js.map file in place).The generated html looks like this:
This inlined js is clearly broken (at the very least something like "(function () {...})()" -wrapping is missing). Anyway supporting embedded event handlers would be a powerful feature.