-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Consider matching ClojureScript behavior regarding js/ #450
Comments
Some more examples in ClojureScript are:
I used |
@mk If you haven't found any remaining cases, I'll close the issue for now. Feel free to comment with new cases. |
Is your feature request related to a problem? Please describe.
We want to use sci as a replacement for self-hosted cljs. We are passing the options
{:classes {'js goog/global :allow :all}
tojs/
calls working.One observed difference is property access:
js/document.body.innerHTML
will work in ClojureScript, but returnnil
in sci.Describe the solution you'd like
Allowing me to set an option for sci to make properties work in sci as they do in ClojureScript.
Describe alternatives you've considered
Asking users to use propery access, i.e.
(.. js/document -body -innerHTML)
instead ofjs/document.body.innerHTML
. For our use case of an online ClojureScript repl the fewer differences in behavior to regular ClojureScript our users need to learn, the better.Additional context
I have not yet found this behavior documented e.g. on https://clojurescript.org/reference/javascript-api but there is at least one reference in the ClojureScript source of it: https://github.com/clojure/clojurescript/blob/0eaa19f4326f02d4dc4e8660ad5f13329b73e3af/src/main/cljs/clojure/browser/repl.cljs#L186
The text was updated successfully, but these errors were encountered: