4 <canvas id=
"A" width=
200 height=
50></canvas><br />
5 <canvas id=
"B" width=
200 height=
50></canvas>
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 ctxB
.fillStyle
= 'green';
15 ctxB
.fillRect(0, 0, width
, height
);
17 ctxA
.fillStyle
= 'red';
18 ctxA
.fillRect(0, 0, width
, height
);