Fork me on GitHub
#cursive
<
2018-01-04
>
bthesorceror06:01:45

anyone using clojurescript see a warning that .querySelector cannot be resolved? been looking all over and can't find much about it.

gklijs09:01:37

@bthesorceror probably you have an error in the syntax, this is working example to use queryselector,

(defn get-radio-value
  [name]
  (.-value (.querySelector js/document (str "input[name=\"" name "\"]:checked"))))

gklijs09:01:07

@bthesorceror I misread, I have the same warning, not sure if it can be resolved, somehow intellij would need to be aware of native javascript.

joshkh12:01:41

are there any tricks to appropriately indent reader conditionals? formatting with ctrl + alt + l produces some odd spacing and also forces values onto new lines:

(ns imcljs.internal.utils
  #?(:cljs (:require-macros [cljs.core.async.macros :refer [go go-loop]]))
  (:require [clojure.string :refer [split]]
    #?(:cljs [cljs.core.async :as a :refer [<! >! chan]]
       :clj
            [clojure.core.async :as a :refer [<! >! go go-loop chan]])
    #?(:clj
            [clojure.data.codec.base64 :as b64])))

jooivind14:01:58

Is there some tool to inspect data-structures in cursive?

jooivind14:01:52

but it’s not cursive-specific of course

jooivind14:01:46

would be nice to have an option for a sort of matlabish interface where current vars in ns can be browsed