The "comments" example is broken in real browsers even though the jasmine tests pass just fine. I think this is since the removal of jQuery. Example below fails with message "Uncaught Error: SYNTAX_ERR: DOM Exception 12" in Chrome and with different message in other browsers.
This error occurs when the "key" parameters of matchingElements is a string representation of a number, like "0" or "1". This happens when the object to be rendered is a string. I think the renderValues method should be changed so that the internals of the object are not scanned for strings. Like below. That would fix it.
renderValues = (template, object) ->
if typeof object == "object"
(setValue(e, v) for e in matchingElements(template, k)) for k, v of object when typeof v != 'object'
else
setValue(template.querySelector(".listElement") || template.querySelector("*"), object)
The "comments" example is broken in real browsers even though the jasmine tests pass just fine. I think this is since the removal of jQuery. Example below fails with message "Uncaught Error: SYNTAX_ERR: DOM Exception 12" in Chrome and with different message in other browsers.
This error occurs when the "key" parameters of matchingElements is a string representation of a number, like "0" or "1". This happens when the object to be rendered is a string. I think the renderValues method should be changed so that the internals of the object are not scanned for strings. Like below. That would fix it.
Failing example page: https://gist.github.com/1868486