Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ClojureScript-specific interop #57

Closed
wasamasa opened this issue May 3, 2018 · 3 comments
Closed

Support ClojureScript-specific interop #57

wasamasa opened this issue May 3, 2018 · 3 comments

Comments

@wasamasa
Copy link

wasamasa commented May 3, 2018

http://cljs.github.io/api/syntax/dot

This allows doing things otherwise not allowed in Clojure. Examples are e.target.value (accessing a property of a variable), Math.PI (accessing a property of an imported object), (XHR.send ...) (calling a property belonging to an imported object). I've taken a brief look at the code, but haven't found CLJS-specific code for interop, so I suspect both Clojure and ClojureScript are treated the same.

@candid82
Copy link
Owner

Fixed by 830f4f0

@wasamasa
Copy link
Author

Thank you, this is a great improvement! There's one case not caught yet though:

(ns foo.bar
  (:import goog.net.XhrIo))

(XhrIo.send "http://example.com" (constantly nil))

XhrIo is highlighted here, with "Parse error: Unable to resolve symbol: XhrIo".

@candid82
Copy link
Owner

Ah, right. Should be good now: 8eade6f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants