@dnolen I found the commit that eliminates the .call
that appears to matter to Hoplon. https://clojure.atlassian.net/browse/CLJS-3157 has a minimal example insofar as illustrating that the .call
goes away, but unfortunately the repro does not yet include an example of this causing a runtime problem. (I'm wondering if there is a simpler minimal repro that doesn't involve the SVGElement, etc.)
I think this is why .call
works for SVGElement
s in Hoplon, and why things break if it is removed https://github.com/hoplon/hoplon/blob/1e73edf7c6e56a4c17a0830cb7f3433cdb039c26/src/hoplon/core.cljs#L460
Gah. I suppose all bets are off and static reasoning may not apply in this case. 😞
Given, this, a minimal repro could be that this code used to work:
cljs.user=> (extend-type js/Element IFn (-invoke ([_] :you-rang?)))
#object[Function]
cljs.user=> ((.-body js/document))
:you-rang?
@mfikes so that's the real problem
it is in fact js
I suspected the problem was something like this
@thheller ^ probably means we need to back out that enhancement for now until we have better ideas
hmm yeah I ran into similar issues when I experimented with https://clojure.atlassian.net/browse/CLJS-3002
maybe worth adding a "new" ^fn
annotation or so though since this should still be possible IMHO
right that's one idea - but going to park this for now - needs to be stewed on
yeah agreed IFn makes this complicated
@mfikes backed out that change, let me know if Canary looks better
@dnolen Looks good now. Commented here https://clojure.atlassian.net/browse/CLJS-3157?focusedCommentId=47432&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-47432
great!