cherry

2024-09-18T15:21:11.136589Z

Does ^:async not work with an anonymous fn?

2024-09-18T15:21:32.315759Z

(defn- generate-submit-handler [shadow-root]
  (fn ^:async [event]
    (.preventDefault event)
    (let [form (.-target event)
          spinner (.querySelector shadow-root "fa-icon")]
      (prn spinner)
      (set! (.-style.visibility spinner) "visible")
      (js/await (subscribe (.. form -email -value)))
      (set! (.-style.visibility spinner) "hidden"))))
var generate_submit_handler = (function (shadow_root) {
return function (event) {
event.preventDefault();
const form1 = event.target;
const spinner2 = shadow_root.querySelector("fa-icon");
prn.call(null, spinner2);
spinner2.style.visibility = "visible";
(await subscribe.call(null, form1.email.value));
return spinner2.style.visibility = "hidden";

borkdude 2024-09-18T15:43:08.922659Z

It should work, please make a repro in the playground and a GitHub issue. I’m currently at a conference so I will get back at it later

šŸ‘ 1
2024-09-18T15:43:38.803149Z

I will. Enjoy the conference!