You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Code Splitting example for ClojureScirpt 1.11+ (#334)
* Fix Code Splitting example - index.html
Figwheel serves the static files from the `target/public/` folder so the
`target` prefix in the `target/cljs-out/*.js` script src paths are incorrect.
This commit fixes the script paths in the index.html host page so the browser
doesn't show 404 responses for the compiled js files.
* Fix Code Splitting example for ClojureScript 1.11+
The goog.dom/createDom function requires a second argument of `opt_attributes`.
(See at https://google.github.io/closure-library/api/goog.dom.html.) In
previous ClojureScript versions, the goog.dom/createDom function was able to
handle the nonexistence of `opt_attributes` argument, miraculously. However,
with ClojureScript 1.11.60, this is considered an error:
dom.js:171 Uncaught TypeError: Cannot set property assignedSlot of #<Element> which has only a getter
at dom.js:171:20
at Object.forEach (object.js:11:7)
at goog.dom.setProperties (dom.js:156:15)
at goog.dom.createDom_ (dom.js:264:16)
at goog.dom.createDom (dom.js:252:19)
at foo$core$listen_to_button (core.cljs:11:17)
at core.cljs:23:16
This commit fixes the error above and is tested on both ClojureScript 1.11.60
and ClojureScript 1.10.773.
0 commit comments