Skip to content
Browse files

Use new ClojureScript property access syntax.

  • Loading branch information...
1 parent d230849 commit 58ec12432b4fac5d21972e0b0484297ed33338cc @lynaghk lynaghk committed Jan 22, 2012
Showing with 8 additions and 8 deletions.
  1. +2 −2 src/pinot/dom.cljs
  2. +5 −5 src/pinot/draw/core.cljs
  3. +1 −1 src/pinot/html.cljs
View
4 src/pinot/dom.cljs
@@ -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]
View
10 src/pinot/draw/core.cljs
@@ -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))))
View
2 src/pinot/html.cljs
@@ -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 58ec124

Please sign in to comment.
Something went wrong with that request. Please try again.