Fork me on GitHub
#clojurescript
<
2019-06-21
>
Andy Nicholson00:06:48

👋 hi everyone. I asked a question over in #cljss that I'll cross-post here as it has more eyeballs 🙂

idiomancy00:06:41

so, in order to use the Custom Elements API, I have to define a static get observedAttributes() {} method on this javascript class. Does anyone know how that interop might be accomplished in cljs?

idiomancy00:06:51

ugh, this spec is so bizarre.

idiomancy00:06:21

@thheller any ideas how one might set a static method on a "class"? (the attributeChangedCallback on the custome elements spec you made here [https://gist.github.com/thheller/36332574918b974a3e4996efcb7457d2] wont work unless you also define a static get method that specifies which attributes to observe)

thheller08:06:58

@idiomancy (js/Object.defineProperty component "observedAttributes" #js {:get (fn [] #js ["a", "b", "c"])) should do it

idiomancy18:06:27

it works perfectly. You remain my patron saint of js interop

Edmund Miller16:06:04

Hey all, just started messing around with clojurescript, I have joker working in clojure but whenever I'm in a .cljs file I get

Suspicious state from syntax checker clojurescript-joker: Flycheck checker clojurescript-joker returned non-zero exit code 1, but its output contained no errors: <file>:0:0: Exception: Nothing specified to load

Try installing a more recent version of clojurescript-joker, and please open a bug report if the issue persists in the latest release.  Thanks!
in my minibuffer

Edmund Miller16:06:33

joker is in my path and flycheck has found it fine

Edmund Miller17:06:42

Ah it appears it was the default

(ns hello-world.core
(:require))
and the blank :require was making it unhappy.

Alan Thompson18:06:35

Has anybody ever user chrome --headless in a docker container (i.e. https://hub.docker.com/r/zenika/alpine-chrome) ? The instructions from figwheel-main work great on the Mac, but I am having trouble getting it to work on Linux or Docker.