I am using it this way ..
var canvas = document.getElementById("canvas");
var contextGrayLine= canvas.getContext("2d");
var contextRedLine= canvas.getContext("2d");
contextGrayLine.lineWidth = 50;
contextRedLine.lineWidth = 20;
contextGrayLine.beginPath();
contextGrayLine.moveTo(10,10);
contextGrayLine.lineTo(500,10)
contextGrayLine.strokeStyle = "#AAA";
contextGrayLine.stroke();
I have created two instances of canvas but the redLine.lineWidth over writes the grayLine.lineWidth value ... why is this happening ???