dom-to-image-more
Version:
Generates an image from a DOM node using HTML5 canvas and SVG
28 lines (22 loc) • 412 B
HTML
<style>
* {
box-sizing: border-box;
}
</style>
<style id="style"></style>
<div>
<h1>DOM node</h1>
<div id="dom-node"></div>
</div>
<div>
<h1>Cloned node</h1>
<div id="cloned-node"></div>
</div>
<div>
<h1>Rendered image</h1>
<canvas id="canvas"></canvas>
</div>
<div>
<h1>Control image</h1>
<img id="control-image" alt="What we loaded from the spec" />
</div>