     (swap! query-cursor assoc :query query)))
 
 (defn- on-headword-search-changed [event query-cursor]
-  (swap! query-cursor assoc :headword-search (aget event "target" "checked")))
+  (swap! query-cursor assoc :headword-search (.-target.checked event)))
 
 (defn- on-key-down [event query-cursor]
-  (when (= "Enter" (aget event "key"))
+  (when (= "Enter" (.-key event))
     (.preventDefault event)
     (search! query-cursor)))
 


(defn- on-phonetic-changed [event query-cursor]
  (let [q        (:query @query-cursor)
        checked? (aget event "target" "checked")
        query    (if checked?
                   (if (str/blank? q)
                     "[phon=\".*\" %c]"

                            (str/replace #"\s*\[\]\s*" " .* ")
                            (str/replace #"^\.\*$" ""))
        on-text-changed (fn [event query-cursor phonetic?]
                          (let [value (.-target.value event)
                                query (if (= value "") "" (phrase->cqp value phonetic?))]
                            (swap! query-cursor assoc :query query)))]
    [single-input-view corpus query-cursor displayed-query show-remove-btn?
