chris22smith,
@chris22smith@mastodon.social avatar

Web devs, is there a reliable way of taking a screenshot, element to image, with JavaScript?

I've tried html2canvas (not faithful), media stream (requires user permission) and blob generation (I can't figure it out).

I'm actually trying to load an iframe then replace it with a screenshot of its content as a way of saving resources.

murtaugh,
@murtaugh@mastodon.social avatar

@chris22smith curious to see what you find, as I looked into this recently and html2canvas was the only thing I found that worked out for me

chris22smith,
@chris22smith@mastodon.social avatar

@murtaugh html2canvas would probably work if I was loading better pages. It's probably my best option so far but I'm hoping for pixel perfect.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • webdev
  • DreamBathrooms
  • khanakhh
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • rosin
  • ethstaker
  • modclub
  • Youngstown
  • slotface
  • osvaldo12
  • kavyap
  • ngwrru68w68
  • everett
  • JUstTest
  • GTA5RPClips
  • tacticalgear
  • Durango
  • normalnudes
  • mdbf
  • provamag3
  • cisconetworking
  • cubers
  • tester
  • Leos
  • megavids
  • anitta
  • lostlight
  • All magazines