The following codes gives the error message  'Cannot read property 'firstChild' 
of undefined'.

Any ideas why ? The html output is as expected. just render-to-str causes this 
error.

(ns om-simple.core
  (:require [om.core :as om :include-macros true]
            [om.dom :as dom :include-macros true]))

(enable-console-print!)

(def app-state (atom {:text "Hello world!"}))

(defn component [app owner]

  (reify

    om/IRender
    (render [_]
      (dom/div nil
               (dom/input #js{:type "text"})))))
(do
  (om/root component app-state {:target (. js/document (getElementById 
"app"))}))

(println (dom/render-to-str (om/build component {})))

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to