Skip to content

Commit

Permalink
Merge pull request #65 from magomimmo/js-prop-access
Browse files Browse the repository at this point in the history
Modified access to JS Properties
  • Loading branch information
ckirkendall committed Oct 28, 2013
2 parents bc7a6f3 + ba8cd1c commit a8843e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -10,6 +10,7 @@ lib
.repl
pom.xml
.lein-plugins
.lein-failures
/target
*.*~
\#*#
Expand Down
6 changes: 3 additions & 3 deletions src/cljs/domina/xpath.cljs
Expand Up @@ -27,7 +27,7 @@
(.selectSingleNode node expr))
(fn [resolver doc node expr]
(let [result (.evaluate doc expr node nil
XPathResult/FIRST_ORDERED_NODE_TYPE nil)]
js/XPathResult.FIRST_ORDERED_NODE_TYPE nil)]
(. result -singleNodeValue)))))

(defn- select-nodes
Expand All @@ -38,7 +38,7 @@
(.selectNodes node expr))
(fn [resolver doc node expr]
(let [result (.evaluate doc expr node nil
XPathResult/ORDERED_NODE_SNAPSHOT_TYPE nil)
js/XPathResult.ORDERED_NODE_SNAPSHOT_TYPE nil)
num-results (.-snapshotLength result)]
(loop [i 0 acc nil]
(if (< i num-results)
Expand All @@ -56,4 +56,4 @@
(nodes [_] (mapcat (partial select-nodes expr) (domina/nodes base)))
(single-node [_] (first (filter (complement nil?)
(map (partial select-node expr)
(domina/nodes base))))))))
(domina/nodes base))))))))

0 comments on commit a8843e5

Please sign in to comment.