-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add console.screenshot
#160
Comments
Speaking purely as a web developer, this seems awesome; I hope other engines watching this repo are interested :). |
Firefox console has a I'd say that it would still be important for the user to directly get the screenshot to clipboard/disk (and not have to perform manual operation from the console output to actually be able to use the image), but that brings question of what to do when the console is not opened yet.
I also wonder how would that work for Node, since many terminal can't display images (print the data URI ?) You can see the supported
|
@nchevobbe right-clicking (context menu) on the image will show a "Save Image" option that allows the user to save the image to disk. Right now, Images are preserved for the Web Inspector session (just like all other It is currently possible to get an image of the full page by using We have a "similar" way to access I do like the idea of being able to copy it to the clipboard though 😁 |
3 years later and I would still like to know if there is any management to take the screenshot and save at the same time. lol |
WebKit has added support for a way to log images of
Node
s, as well as the contents of the viewport, throughconsole.screenshot
(when Web Inspector is open).There are also plans to expand support for other object types, like
ImageData
[1],ImageBitmap
[1], and instances all the various<canvas>
context types (e.g.CanvasRenderingContext2D
) [2].If the first argument is not able to take a "screenshot" (or generate some image),
console.screenshot
will default to logging an image of the viewport.All arguments are currently logged before the image is shown.
This could be further extended to provide the ability to generate images from arbitrary content, like a dataURL string [3] or a detached/fragment DOM tree.
[1]: <https://webkit.org/b/199304> Web Inspector: support
console.screenshot
with ImageData and ImageBitmap[2]: <https://webkit.org/b/199305> Web Inspector: support
console.screenshot
with subclasses of CanvasRenderingContext[3]: <https://webkit.org/b/199307> Web Inspector: support
console.screenshot
with dataURL stringsThe text was updated successfully, but these errors were encountered: