NEW237208
Web Inspector: `console.screenshot` like API that returns image object
https://bugs.webkit.org/show_bug.cgi?id=237208
Summary Web Inspector: `console.screenshot` like API that returns image object
Christopher Atlan
Reported 2022-02-25 06:37:21 PST
We would be interested in a API like `console.screenshot` that would return an image object instead of displaying the image inaccessible on the console. Our Safari Web Extension allows users to send HTML or CSS to Kaleidoscope, for a visual text comparison. With the current API we are able to send the HTML or computed CSS of an element via context menu action to Kaleidoscope. We also provide a javascript function, so developers can send any textual content to the app over the Web Inspector Console Command Line: > ksdiff($0.innerHTML) It would be great if we could also provide image comparison in a similar manner like: > ksdiff(inspector.screenshot($0))
Attachments
Radar WebKit Bug Importer
Comment 1 2022-02-25 09:55:44 PST
Sam Sneddon [:gsnedders]
Comment 2 2022-05-16 08:50:19 PDT
See also https://github.com/whatwg/console/issues/160 with regards to adding screenshot to the Console spec; we'd want to propose/discuss something like this there as well. One option would be to just make it return something like a blob URL and then auto-magically show that in the Console.
Note You need to log in before you can comment on or make changes to this bug.