   [id]
   (.getElementById js/document id))
 
-(defn by-tag
-  [tag-name]
-  (aget (.getElementsByTagName js/document tag-name) 0))
-
 (defn attr!
   [el attr val]
   (aset el attr val)

;;-----------------------------------------------------------------------------

(defn resize!
  [ctx e]
  (let [w (- (.-innerWidth js/window) 40)
        h (- (int (/ (* w 9) 16)) 40)]
    (-> (by-id "canvas")

    (.beginPath ctx)
    (.arc ctx x y radius 0 (* 2 js/Math.PI) false)
    (.fill ctx)
    (.closePath ctx)
    ctx))

(extend-type Rect
  IDrawable
