                 (string? tag-handler)
                 (dom-element tag-handler tag-name tail)
 
-                (fn? tag-handler)
+                (ifn? tag-handler)
                 (as-velem (tag-handler tag-name tail))
 
                 :default

                              (if cls (str class " " cls) class)))))

          children (if have-attrs (rest tail) tail)
          children* (append-children* #js [] children)]
      (elem-factory ns-uri tag-name attrs children*))))

(def dom-element
  (element*
   (fn [ns-uri tag-name attrs children*]
     (DOMElement. ns-uri tag-name attrs children* nil nil nil))))

(defn- dom-node? [x]
  (and x (> (.-nodeType x) 0)))

              (.warn js/console "Undefined ns node prefix" tag-ns))
            (dom-element nil tag-name tail)))

        (and (ifn? head) (not (sequential? head)))
        (as-velem (r/rx* (fn [] (apply head (rest elem-spec)))))

        :default
