You need to console.log.call(console, "hi") in JS so presume you need to do
the equivalent in ClojureScript.
On 20 Mar 2015 18:28, "David Nolen" <[email protected]> wrote:

> You can't do this in many cases with JavaScript either, try it.
>
> David
>
> On Fri, Mar 20, 2015 at 2:12 PM, Charles-P. Clermont <
> [email protected]> wrote:
>
>> Hi,
>>
>> I'm not sure if this is a bug or a hole in my knowledge.
>> Can someone explain why I can do
>>
>> ```
>> ((.-cos js/Math) 0) ;; => 1
>> ```
>>
>> But not
>> ```
>> ((.-log js/console) "hi") ;; => Illegal Invocation
>> ```
>>
>> The goal being to declare
>>
>> ```
>> (def log (.-log js/console))
>> (def cos (.-cos js/Math))
>> ;; etc.
>> ```
>>
>> Thanks!
>>
>> CP
>>
>> --
>> 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.
>

-- 
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.

Reply via email to