                          :charset "charSet"})
 
 (defn obj-get [o k]
-  (when (.hasOwnProperty o k)
+  (when (true? (.hasOwnProperty o k))
     (aget o k)))
 
 (defn cached-prop-name [k]


;;; Common utilities

(defn named? [x]
  (or (keyword? x)
      (symbol? x)))

(defn hiccup-tag? [x]
  (or (named? x)
      (string? x)))

(defn valid-tag? [x]
  (or (hiccup-tag? x)
      (ifn? x)
      (instance? NativeWrapper x)))

;; See: https://html.spec.whatwg.org/multipage/forms.html#do-not-apply
(def these-inputs-have-selection-api #{"text" "textarea" "password" "search" "tel" "url"})

(defn ^boolean has-selection-api?
  [input-type]
  (contains? these-inputs-have-selection-api input-type))

