Use the native apply:

(.apply (.-setAlign n) n #js [1 2 3])

On Thursday, July 2, 2015, Sonny To <son.c...@gmail.com> wrote:

> I have setAlign method on a javascript object called n:
>
> (.setAlign n 1 2 3)
>
> I want to use apply to make the same call
>
> (apply (.setAlign n) [1 2 3])
>
> However that does work. Any suggestion on how to use apply in this way?
> The alternative is to write a macro.
>
> thanks,
> Sonny
>
> --
> 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 clojurescript+unsubscr...@googlegroups.com <javascript:;>.
> To post to this group, send email to clojurescript@googlegroups.com
> <javascript:;>.
> 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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to