browsh icon indicating copy to clipboard operation
browsh copied to clipboard

Chrome's DOMSnapshot to improve Browsh's rendering and performance

Open tombh opened this issue 3 years ago • 2 comments

Thanks to a friendly person (we've only chatted in private email, hence me not automatically revealing his name), I've been made aware of Chrome's ability to capture the entire state of the DOM in any given moment, see: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#method-captureSnapshot

Using this for Browsh could have a profound affect on its rendering quality and performance. Currently we have to do all kinds of hacks to get the pixel coordinates and visibility of individual characters. DOMSnapshot seems to encapsulate all of that in a formal API. There's even a Go wrapper for it https://github.com/chromedp/cdproto/blob/master/domsnapshot/domsnapshot.go

If and when I get back to working on Browsh, that'll be the first thing I'll look into.

tombh avatar Oct 11 '21 15:10 tombh

So this is never going to happen, right?

dardo82 avatar Oct 30 '22 03:10 dardo82

So this is never going to happen, right?

bump

bakerbrandond avatar Feb 15 '23 18:02 bakerbrandond