mirror of
https://github.com/adriancooney/console.snapshot.git
synced 2025-12-08 21:26:19 +00:00
Enabling console.screenshot during paused execution, fixes #1
This commit is contained in:
parent
c9ee8f2236
commit
2c29984763
@ -211,7 +211,13 @@
|
||||
* @return {null}
|
||||
*/
|
||||
console.screenshot = function(canvas, scale) {
|
||||
console.image(canvas.toDataURL(), scale);
|
||||
var url = canvas.toDataURL(),
|
||||
width = canvas.width,
|
||||
height = canvas.height,
|
||||
scale = scale || 1,
|
||||
dim = getBox(width * scale, height * scale);
|
||||
|
||||
console.log("%c" + dim.string, dim.style + "background-image: url(" + url + "); background-size: " + (width * scale) + "px " + (height * scale) + "px; color: transparent;");
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user