                              (cb (.-response xhr)))))
       (.send xhr))))
 
-(defn load! [uri]
+(defn load-image! [uri]
   (let [ret-chan (chan)]
     (-> (js/XMLHttpRequest.)
-        (get-blob! uri #(put! ret-chan %)))
+        (get-img! uri #(put! ret-chan %)))
     ret-chan))
 
 (do
   (go
-    (let [load-chan (load! file-name)
-          blob (<! load-chan)]
-      (log-js "Got blob!")
-      (log-js blob))))
+    (let [img (<! (load-image! file-name)) ]
+      (log-js "Got img!")
+      (log-js img)   
+      (dommy/append! (by-id "app") img)
+      )))
 
 ;; }}}
 

    [goog.crypt             :as crypt]
    [goog.crypt.base64      :as b64]
    ; [goog.labs.net.xhr      :as xhr2]

    [om.core                :as om :include-macros true]
    [om.dom                 :as dom :include-macros true]))


(def file-name "/data/tiles.png")

(defprotocol IXHRReq
  (get-status [_])
  (okay? [_])
  (get-img! [_ uri cb])
  (get-blob! [_ uri cb]))

(extend-type js/XMLHttpRequest
  IXHRReq
  (get-status [this] (.-status this))
  (okay? [this] (== 200 (get-status this)))
  (get-img! [xhr uri cb]
    (->>
      (fn [blob]
        (let [blobURL (.createObjectURL js/URL blob)
              img (hipo/create [:img ^:attrs {:src blobURL}]) ]
          (cb img)))
      (get-blob! xhr uri)))

  (get-blob! [xhr uri cb]
    (do
