XPathResult/ANY_TYPE
; => WARNING: No such namespace: XPathResult
The following 3 forms seem to be equivalent and work without warnings...
XPathResult.ANY_TYPE
js/XPathResult.ANY_TYPE
(.-ANY_TYPE js/XPathResult)
Is any of these preferable over the others?
On the other hand, in Clojure a "/" can still be used (without warnings) to access a Java class static field [2]. For example [3]
Math/PI
So I wonder... why the ClojureScript syntax to access the static property of a class is different than in Clojure?
Thanks,
Xavi
[1] https://developer.mozilla.org/en/docs/XPathResult
[2] http://clojure.org/java_interop
[3] There's also a Math class in JavaScript ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/PI ), but I've not used it in the ClojureScript example above because Math/PI doesn't generate any warning, apparently because Math is an exception from what I understand from this commit
https://github.com/clojure/clojurescript/commit/4769c5e05233d9841aedf882bd99812d0f842abb
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.