Bug 237208
| Summary: | Web Inspector: `console.screenshot` like API that returns image object | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Christopher Atlan <catlan> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | inspector-bugzilla-changes, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 15 | ||
| Hardware: | All | ||
| OS: | All | ||
Christopher Atlan
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/89479439>
Sam Sneddon [:gsnedders]
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.