Background: I want to deploy a single file JavaScript File that is sort of an 
extension of an existing proprietary website (that allows customizations via 
user uploaded JavaScript). It would be nice to be able to do it in cljs.

Problem: The site provides JavaScript API's, say that is some.record.getId(). 
This successfully returns a number when I try it on the browser console, but 
when I try to do the following js inter-op, the result is null.

Attempt1:
```
(.getId (.-record js/some))
```

I also tried this and it does returns a function:

Attempt2
```
(.-getId (.-record js/some))
=> function (){if(!Qp(Up,Tp,Wp)||!Yw)return null;var a=Number(Yw.id);  
if(0<a)return a;throw Error();}
```

But then calling that returned function returns null as well.

Looking what Attempt1 compiles into (simple optimization), it is doing this:
some.record.getId.call(null). Typing this in the browser console returned a 
number successfully! ...at which point I got completely confused :(

Appreciate any tips/pointers & please let me know if any additional info is 
necessary. Thanks!

Ikuru

-- 
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 https://groups.google.com/group/clojurescript.

Reply via email to