Fork me on GitHub
#clojurescript
<
2019-09-22
>
paul a00:09:31

my project's only clojurescript dependency is reagent...

ouvasam08:09:23

Hi, is it possible to extend a js class using clojurescript ?

p-himik09:09:24

It is, but it's just the required JS code ported to CLJS. Example:

(defn MyListener []
  (this-as this
    (.call Listener this)))

(set! (.. MyListener -prototype)
      (js/Object.create (.-prototype Listener)))

(set! (.. MyListener -prototype -constructor)
      Listener)

ouvasam10:09:33

Cool thanks !