canvas-interceptor icon indicating copy to clipboard operation
canvas-interceptor copied to clipboard

Support HTMLCanvasElement arguments serialization

Open rams3s opened this issue 8 years ago • 1 comments

This change is Reviewable

rams3s avatar Jun 07 '17 15:06 rams3s

Thanks for the PR.

The dependencies thing should not be necessary, because the script should have detected the usage of the canvas elements before. Simply using the getCanvasName(...).canvas should be sufficient (and if you amend the PR to only this change, I will approve it if I don't find other issues during tests. What are you using as a test case?

If the canvas-interceptor ran after the canvases were created, then replaying the dependencies will not help with reconstructing the canvas because not all commands have been found.

Exactly because of these potentially missing instructions (when the script runs too late), I did not initially support HTMLCanvasElement serialization. For methods like drawImage, it would also suffice to serialize the canvas using .toDataURL().

Rob--W avatar Jun 10 '17 11:06 Rob--W