Javascript->closureScriptFn()

79 views
Skip to first unread message

Joel

unread,
Feb 6, 2014, 11:50:33 AM2/6/14
to clojur...@googlegroups.com
I've seen examples of calling into javascript from closurescript, but none vice-versa.

This seems like a real problem if you need the javascript to make a callback. Workarounds? Or, did I just miss some interop documentation?

J

David Nolen

unread,
Feb 6, 2014, 11:52:43 AM2/6/14
to clojur...@googlegroups.com
On Thu, Feb 6, 2014 at 11:50 AM, Joel <jo...@harpsoft.com> wrote:
I've seen examples of calling into javascript from closurescript, but none vice-versa.

This seems like a real problem if you need the javascript to make a callback. Workarounds? Or, did I just miss some interop documentation?

For the callback case it's a non-issue, you just pass a function since ClojureScript functions *are* JavaScript functions. Do you have some more specific case in mind that seems problematic to you?

David 

Joel Trunick

unread,
Feb 6, 2014, 11:56:03 AM2/6/14
to clojur...@googlegroups.com
No, i just simply missed this in the docs. Thanks!


--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/fXPQRZnOl_Y/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Joel Holdbrooks

unread,
Feb 15, 2014, 6:52:42 PM2/15/14
to clojur...@googlegroups.com
FYI: Don't forget to add the ^:export meta data to the function if you intend to call ClojureScript code compiled in :advanced mode from JavaScript.
Reply all
Reply to author
Forward
0 new messages