diff --git a/sx/sx/applications/htmx/runner.sx b/sx/sx/applications/htmx/runner.sx index 3c8c4809..c0c8c8f4 100644 --- a/sx/sx/applications/htmx/runner.sx +++ b/sx/sx/applications/htmx/runner.sx @@ -24,29 +24,28 @@ "true")) true (do (hs-wait 200) (wait-boot)))))) - (begin - (reload-frame - (fn - () - (let - ((w (host-get (dom-query "#test-iframe") "contentWindow"))) - (host-call (host-get w "location") "reload") - (hs-wait 1000) - (wait-boot) - (hs-wait 500)))) - (wait-for-el - (fn - (sel max-tries) - (let - ((doc (get-doc)) - (el (when doc (host-call doc "querySelector" sel)))) + (reload-frame + (fn + () + (let + ((w (host-get (dom-query "#test-iframe") "contentWindow"))) + (host-call (host-get w "location") "reload") + (hs-wait 1000) + (wait-boot) + (hs-wait 500)))) + (wait-for-el + (fn + (sel max-tries) + (let + ((doc (get-doc)) + (el (when doc (host-call doc "querySelector" sel)))) + (if + el + el (if - el - el - (if - (<= max-tries 0) - nil - (do (hs-wait 200) (wait-for-el sel (- max-tries 1))))))))) + (<= max-tries 0) + nil + (do (hs-wait 200) (wait-for-el sel (- max-tries 1)))))))) (run-action (fn (action)