Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #20 from lynaghk/master

Use new ClojureScript property access synatax.
  • Loading branch information...
commit 970ca84cda02a9a38c3e826a7529815a356ae849 2 parents d230849 + eb941e6
@ibdknox authored
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/events.cljs
@@ -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
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)))))
Please sign in to comment.
Something went wrong with that request. Please try again.