Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <canvas id="A" width=200 height=50></canvas><br />
5 <canvas id="B" width=200 height=50></canvas>
6 <script>
7 var canvasA = document.getElementById("A"),
8 ctxA = canvasA.getContext('2d'),
9 canvasB = document.getElementById("B"),
10 ctxB = canvasB.getContext('2d'),
11 width = canvasA.width,
12 height = canvasA.height;
14 ctxA.fillStyle = 'green';
15 ctxA.fillRect(0, 0, width, height);
17 ctxB.drawImage(canvasA, 0, 0);
19 ctxA.fillStyle = 'red';
20 ctxA.fillRect(0, 0, width, height);
21 </script>
22 </body>
23 </html>