Prismatic/dommy — pull request #76 by pangloss (2014-02-05 23:10:20+00:00)
Title: Extend DOM collection class *instances* with cljs protocols

This is the replacement for pr #51. I've renamed the clobber library to synergize now that it works using `specify!` and doesn't need to modify the environment anymore.

I think it's a real improvement that the browser's built in lazy data structures aren't being forced and cloned anymore.

In addition, this makes other interesting functionality possible. For instance, I added an `(attributes el)` function that returns a 'synergized' `NamedNodeMap` that acts as a transient map to element attributes. If an attribute is associated or dissociated using `assoc!` or `dissoc!`, that attribute can be set directly on the node. It also allows you to get attributes from a node using destructuring: `(let [{:keys [id class]} (attributes el)] ...)`. Similar functionality should be possible also with CSS style declarations, though I haven't looked in as much detail at those classes yet.

As before, feedback is welcome!