Closed walterrw closed 11 years ago
+1 as well. Imho #14 and #15 deserve some attention, both make working with dommy quite difficult on a rather large codebase that got ported from crate/hiccups, these backward compat. issues are hard to spot.
Same here. I'm converting an app from crate, and am often hitting issues 14 and 15.
It seems that by passing an empty string to a template defined by deftemplate, the node (in this case a textnode) cannot be created and an exception is thrown, because the protocol function -elem is not defined for the type string.
The reason for this might be that the protocol is implemented for the type js/String, which does not match empty strings. A similar issue is discussed here http://dev.clojure.org/jira/browse/CLJS-347.
I added a failing test to reproduce the problem and a fix in template.cljs. I think this should fix the issue, but I'm not sure if there's other aspects that need to be considered.