dom-to-image is a JavaScript library which can turn arbitrary DOM node into a SVG (vector) or PNG-JPEG (raster) image.
It's based on domvas library and rewritten with some bugs fixed and some new features added.
Website Demo