Permalink
Browse files

Merge pull request #20 from lynaghk/master

Use new ClojureScript property access synatax.
  • Loading branch information...
2 parents d230849 + eb941e6 commit 970ca84cda02a9a38c3e826a7529815a356ae849 @ibdknox committed Jan 23, 2012
Showing with 9 additions and 9 deletions.
  1. +2 −2 src/pinot/dom.cljs
  2. +5 −5 src/pinot/draw/core.cljs
  3. +1 −1 src/pinot/events.cljs
  4. +1 −1 src/pinot/html.cljs
View
@@ -87,7 +87,7 @@
;; ********************************************
(defn parent [elem]
- (.parentNode elem))
+ (.-parentNode elem))
(defn is-dom? [elem]
(dom/isNodeLike elem))
@@ -144,7 +144,7 @@
;; The results are a nodelist, which looks like an array, but
;; isn't one. We have to turn it into a collection that we can
;; work with.
- (for [x (range 0 (.length nl))]
+ (for [x (range 0 (.-length nl))]
(aget nl x)))
(defn query [q]
@@ -1,11 +1,11 @@
(ns pinot.draw.core)
(def animation-frame
- (or (.requestAnimationFrame js/window)
- (.webkitRequestAnimationFrame js/window)
- (.mozRequestAnimationFrame js/window)
- (.oRequestAnimationFrame js/window)
- (.msRequestAnimationFrame js/window)
+ (or (.-requestAnimationFrame js/window)
+ (.-webkitRequestAnimationFrame js/window)
+ (.-mozRequestAnimationFrame js/window)
+ (.-oRequestAnimationFrame js/window)
+ (.-msRequestAnimationFrame js/window)
(fn [callback] (js/setTimeout callback 17))))
@@ -34,7 +34,7 @@
(defn make-listener [func parsed]
(fn [e]
- (let [target (.target e)]
+ (let [target (.-target e)]
(if-let [match (match? parsed target)]
(func match e)
true))))
View
@@ -26,7 +26,7 @@
;;TODO: there's a bug in clojurescript that prevents seqs from
;; being considered collections
(seq? c) (as-content parent c)
- (.nodeName c) c)]
+ (.-nodeName c) c)]
(when child
(gdom/appendChild parent child)))))

0 comments on commit 970ca84

Please sign in to comment.