Hi Adrian, essentially I want to install some function on a JS object from ClojureScript, and make sure it can be called from JS.
My issue is that I don't know how to enforce a valid function name from the ClojureScript side. Because the function name is only known at runtime I can only use aget/aset which in turns rely on the JS bracket operator. The bracket operator doesn't appear to restrict property names while function name have some restrictions. For instance I could install 'invalid-name' from ClojureScript but obj.invalid-name() would fail from JS side (the trick being that obj['invalid-name'] would reference the function). Looking at the code from goog.reflect I can see it relies on the bracket operator so I don't think it can help. Julien 2014-01-29 <[email protected]> > goog.reflect ( > http://docs.closure-library.googlecode.com/git/namespace_goog_reflect.html) > might be what you're looking for - but I'm not sure I understand your > problem. > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
