Fork me on GitHub
#cljs-dev
<
2019-08-12
>
mfikes00:08:20

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

mfikes00:08:01

I think this is why .call works for SVGElements 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. 😞

mfikes00:08:36

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?

dnolen17:08:44

@mfikes so that's the real problem

dnolen17:08:49

it is in fact js

dnolen17:08:05

I suspected the problem was something like this

dnolen17:08:21

@thheller ^ probably means we need to back out that enhancement for now until we have better ideas

thheller17:08:30

hmm yeah I ran into similar issues when I experimented with https://clojure.atlassian.net/browse/CLJS-3002

thheller17:08:04

maybe worth adding a "new" ^fn annotation or so though since this should still be possible IMHO

dnolen17:08:05

right that's one idea - but going to park this for now - needs to be stewed on

thheller17:08:39

yeah agreed IFn makes this complicated

dnolen17:08:33

@mfikes backed out that change, let me know if Canary looks better