plumatic / dommy

A tiny ClojureScript DOM manipulation and event library
760 stars 73 forks source link

append! requires a DOM node, documentation says otherwise #87

Closed icemaze closed 10 years ago

icemaze commented 10 years ago

In the README file the following example is given:

(dommy/append! (sel1 :#todos) [:.todo "Eat some cake"])

This doesn't work since append! expects a DOM Node:

Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.

Either the documentation should be fixed or append! should accept hiccup-like markup.

cpetzold commented 10 years ago

Oops, thanks! We recently removed the hiccup-like tempting from Dommy to simplify. I've updated the readme: https://github.com/Prismatic/dommy/commit/8b3471f455cc56bab15062ad3088b57c419e8b12