Re: what is js/ in clojurescript?

2014-08-17 Thread Roberto Agostino Vitillo
As noted in the BR, it seems like JS style access after the / was actually intended. Is this behaviour documented somewhere? I see more and more examples in the wild that exploit this feature, it would be great to have it documented somewhere as it can cause confusion. -- You received this

Re: what is js/ in clojurescript?

2013-01-12 Thread Jonas
Hi I created an issue+patch on JIRA: http://dev.clojure.org/jira/browse/CLJS-455 Jonas On Monday, January 7, 2013 3:58:25 PM UTC+2, Peter Taoussanis wrote: Thanks David. Ticket patch welcome. I've been lazy / holding out for the electronic CA, but I'll make a note to come back to

Re: what is js/ in clojurescript?

2013-01-12 Thread David Nolen
Thanks! On Saturday, January 12, 2013, Jonas wrote: Hi I created an issue+patch on JIRA: http://dev.clojure.org/jira/browse/CLJS-455 Jonas On Monday, January 7, 2013 3:58:25 PM UTC+2, Peter Taoussanis wrote: Thanks David. Ticket patch welcome. I've been lazy / holding out for the

Re: what is js/ in clojurescript?

2013-01-07 Thread Peter Taoussanis
I would not rely on this behavior. Follow Clojure's property access conventions. Sorry to dig this up again - would just like to clarify: The idiomatic way of accessing something like `window.location.pathname` then would be (aget js/window location pathname), or nested .- accesses, correct?

Re: what is js/ in clojurescript?

2013-01-07 Thread David Nolen
Yes a warning would be great as well as fixing the examples. Ticket patch welcome. On Monday, January 7, 2013, Peter Taoussanis wrote: I would not rely on this behavior. Follow Clojure's property access conventions. Sorry to dig this up again - would just like to clarify: The idiomatic

Re: what is js/ in clojurescript?

2013-01-07 Thread Peter Taoussanis
Thanks David. Ticket patch welcome. I've been lazy / holding out for the electronic CA, but I'll make a note to come back to this if no one else steps up. Cheers! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: what is js/ in clojurescript?

2012-05-03 Thread David Nolen
I would not rely on this behavior. Follow Clojure's property access conventions. David On Thursday, May 3, 2012, Rob wrote: Hi, Syntax like this doesn't work in normal Clojure, right? js/document.body.style It just did in a ClojureScript repl. Is there something magic about js/ ?

Re: what is js/ in clojurescript?

2012-05-03 Thread Devin Walters
Some additional information if you're interested: http://dev.clojure.org/jira/browse/CLJS-89 http://dev.clojure.org/display/design/Unified+ClojureScript+and+Clojure+field+access+syntax '(Devin Walters) On Thursday, May 3, 2012 at 10:47 AM, David Nolen wrote: I would not rely on this

what is js/ in clojurescript?

2012-05-02 Thread Rob
Hi, Syntax like this doesn't work in normal Clojure, right? js/document.body.style It just did in a ClojureScript repl. Is there something magic about js/ ? What is it? thanks, Rob -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: what is js/ in clojurescript?

2012-05-02 Thread Tamreen Khan
A quick explanation is that functions/other javascript objects that otherwise exist in the global namespace (ie. document, console, window) are accessed through the js/ in Clojurescript. This is a JS-specific thing and therefore you don't find js/ in regular Clojure. However, doing the form

Re: what is js/ in clojurescript?

2012-05-02 Thread Rob
On Thursday, May 3, 2012 12:17:03 AM UTC-4, Tamreen Khan (Scriptor) wrote: However, doing the form (MyClass/MyStaticMethod arg1 arg2 ...) *does* exist in Clojure. It's a way of calling static Java methods or accessing static fields. See http://clojure.org/java_interop for more info.