window.onload = function() {
// Some code
var c = document.getElementById("canvas");
var ctx= c.getContent('2D');
ctx.beginPath();
ctx.rect(0, 0, 60, 20);
ctx.fillStyle = 'limegreen';
ctx.fill();
ctx.beginPath();
ctx.moveTo(0,0);
ctx.lineTo(50,50);
ctx.stroke(255);
why is this code not performing any thing?
it is not throwing error either.
window.onload = function() { // Some code var c = document.getElementById("canvas"); var ctx= c.getContent('2D'); ctx.beginPath(); ctx.rect(0, 0, 60, 20); ctx.fillStyle = 'limegreen'; ctx.fill(); ctx.beginPath(); ctx.moveTo(0,0); ctx.lineTo(50,50); ctx.stroke(255); why is this code not performing any thing? it is not throwing error either.