squint

m3tti 2024-10-12T07:22:52.800429Z

how would i do something like that in squint?

somefunction(...data);

borkdude 2024-10-12T07:52:53.548559Z

probably (apply someFunction data)

m3tti 2024-10-12T07:53:07.910269Z

yeah 😄 exactly what i was doing now 😄

m3tti 2024-10-12T07:53:27.486829Z

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

borkdude 2024-10-12T07:53:40.882219Z

duckie squint

m3tti 2024-10-12T07:53:59.433239Z

i'm currently working out an htmz in squint 😄

borkdude 2024-10-12T07:54:11.048589Z

:-D

m3tti 2024-10-12T07:54:17.235469Z

https://kalabasa.github.io/htmz/ 😄 love the idea 😄

m3tti 2024-10-12T07:54:32.754819Z

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

m3tti 2024-10-12T15:03:39.451539Z

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 ;)

borkdude 2024-10-12T15:05:33.566909Z

lol

m3tti 2024-10-12T15:05:57.197869Z

I know its ugly xD

m3tti 2024-10-12T15:06:15.989539Z

I'll try to make it better

borkdude 2024-10-12T15:28:44.454239Z

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

❤️ 1
borkdude 2024-10-12T14:55:52.440479Z

https://github.com/squint-cljs/squint/tree/main/examples/instantdb

❤️ 2