Image in the readme would really be helpful. In fact anytime there is a visual output it makes sense to put an image. Thanks for creating this though - Will give it a try for an upcoming project.
Show HN: I created snapDOM to capture DOM nodes as images with exceptional speed
31–40 of 45 posts
Re: Show HN: I created snapDOM to capture DOM nodes as images with exceptional speed
#32How does this compare to something like the the Media Capture API? Looks like this uses `canvas.toDataURL()` which can be slow to serialize compared to `toBlob` or `canvas.captureStream(0).getVideoTracks()` I've been using CropTarget.fromElement with a CaptureController: https://gist.github.com/akre54/e93ab2ce27999aecb109e38085f2e...
Looks cool, somebody should make a package that puts a nice API around it. However seems that those APIs are only in Chrome now, not Firefox or Safari.
Re: Show HN: I created snapDOM to capture DOM nodes as images with exceptional speed
#33I’ve been writing a browser extension recently, and part of the functionality I want is to export part of a view as an image, shareable for the socials. I wanted to use html2canvas, but the docs explicitly advise against using it in a browser extension. Would snapDOM be suitable for inclusion in an extension?
Re: Show HN: I created snapDOM to capture DOM nodes as images with exceptional speed
#34Re: Show HN: I created snapDOM to capture DOM nodes as images with exceptional speed
#35Earlier quoted context omitted.
Looks cool, somebody should make a package that puts a nice API around it. However seems that those APIs are only in Chrome now, not Firefox or Safari.
IMO it's simple enough to just write directly without library code. For most cases, the Element Capture or Region Capture API should be sufficient: https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capt... Demos: https://mdn.github.io/dom-examples/screen-capture-api/elemen... https://mdn.github.io/dom-examples/screen-capture-api/region... If you need cross-browser compatibility (and can't just use a canvas) the…
Re: Show HN: I created snapDOM to capture DOM nodes as images with exceptional speed
#36Plus it just struck at pending promise dont work
Plus css is messed up, i cant call it a snapshot, if it dont look same
domtoimage lib works for me and is fast whole html body node captured within second
Re: Show HN: I created snapDOM to capture DOM nodes as images with exceptional speed
#37Tiny feature request: snapdom.toJpg(el) appears to return a JPEG image where the background color for any transparent areas is set to black - it would be useful to be able to set that to another color (I needed it to be white).
Re: Show HN: I created snapDOM to capture DOM nodes as images with exceptional speed
#38Tiny feature request: snapdom.toJpg(el) appears to return a JPEG image where the background color for any transparent areas is set to black - it would be useful to be able to set that to another color (I needed it to be white).
No problem! May you open an issue on the repo?
Re: Show HN: I created snapDOM to capture DOM nodes as images with exceptional speed
#39I’ve been writing a browser extension recently, and part of the functionality I want is to export part of a view as an image, shareable for the socials. I wanted to use html2canvas, but the docs explicitly advise against using it in a browser extension. Would snapDOM be suitable for inclusion in an extension?