├── test.html
├── README.md
└── canvas-interceptor.js
/test.html:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
canvas-interceptor.js test
7 |
8 |
9 |
10 |
11 |
117 |
118 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Canvas Interceptor
2 | `canvas-interceptor.js` is a snippet to aid with debugging canvas issues, and
3 | designed to create reduced test cases.
4 |
5 | Load `canvas-interceptor.js` before the web page uses the HTML5 canvas API.
6 | Then the all method calls and property invocations on canvas objects will be
7 | logged and stored in the `__proxyLogs` property on the canvas context. The final
8 | code to recreate the canvas can be generated by calling `getCanvasReplay(canvas)`.
9 |
10 | Example:
11 |
12 | ```html
13 |
14 |
15 |
16 |
17 |
18 |
25 | ```
26 |
27 | See test.html for more examples.
28 |
29 |
30 | ## Usage
31 |
32 | If you control the source code, loading the snippet via a `