# 如何把 DOM 转化为图片
更多描述
可参考 npm package
- html2canvas (opens new window): Screenshots with JavaScript
- dom-to-image (opens new window): Generates an image from a DOM node using HTML5 canvas
Issue
欢迎在 Gtihub Issue 中回答此问题: Issue 437 (opens new window)
Author
https://www.zhangxinxu.com/study/201708/svg-foreignobject-dom-to-image.html 看到这样一篇文章
Author
DOM -> SVG -> Canvas -> JPEG/PNG
Author
核心 foreignObject