squint 2024-10-12

how would i do something like that in squint?

somefunction(...data);

probably (apply someFunction data)

yeah 😄 exactly what i was doing now 😄

sometimes you just have to call stuff out to realize what you have to do 😄 thank you duckie 😄

duckie squint

i'm currently working out an htmz in squint 😄

but i have to first get it working and than strip out stuff 😄

Btw here is the cljs code i came up with

;; kudos to 
(defn htmc [frame]
  ;; Your extension here
  (js/setTimeout
   #(let [el# (.querySelector js/document (or frame.srcElement.contentWindow.location.hash nil))]
     (el#.replaceWith.apply el# frame.srcElement.contentDocument.body.childNodes))))

(->
 (js/document.getElementById "htmc")
 (.addEventListener "load" htmc))
And the hiccup part
;; kudos to 
(defn htmc
  "Has to be a function due to the hotreload of the htmc.cljs code. If you want to extend it."
  []
  [:div 
   (c/cljs-module "htmc")
   [:iframe {:id "htmc" :hidden true :name "htmc"}]])
Btw already replaced htmx in borkweb ;)

I know its ugly xD

I'll try to make it better

I'm not laughing at your code, I just enjoy your enthusiasm )

❤️ 1