5 ms·
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://dev
by krebby 1y ago
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_Capture_API/Element_Region_Capture#the_element_capture_api https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capt...
Demos: https://mdn.github.io/dom-examples/screen-capture-api/element-capture/ https://mdn.github.io/dom-examples/screen-capture-api/elemen... https://mdn.github.io/dom-examples/screen-capture-api/region-capture/ https://mdn.github.io/dom-examples/screen-capture-api/region...
If you need cross-browser compatibility (and can't just use a canvas) then yeah html2canvas is the way to go
- streptomycin 1y agoidk, your code is 170 lines, html2canvas and similar are 1 line to use.