squint
squint copied to clipboard
defclass static methods and fields
It would be great if defclass
could support static methods and fields as it's widely available now.
At the moment as a workaround I am doing the following as mentioned here (https://clojureverse.org/t/modern-js-with-cljs-class-and-template-literals/7450/6):
(defclass DisplayVar
(extends HTMLElement)
(constructor [this]
(super))
Object
(attributeChangedCallback [this name old-val new-val]
(js/console.log name old-val new-val)))
(set! (.-observedAttributes DisplayVar) ["variable"])