Is there any way to obtain the canvas that a context is used for?
Why I'm asking is because I'm creating a prototype function for
var cv = document.getElementById('canvas');
var ctx = cv.getContext('2d');
// Using only 'ctx', how to get 'cv'?
ctx.canvas should return the canvas DOM node, from which you can get height and width.
Firefox was able to return ctx.canvas, as well as ctx.canvas.width and ctx.canvas.height. Also confirmed in Chrome.