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))
<rdar://problem/89479439>
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.