Possible to do linear gradient on background of canvas element?

Hey all,

I know there’s a CSS option to have an elements background to be a linear color gradient. However, I was wondering if this is possible for an HTML’s canvas as well. The canvas is obviously, defined in the HTML document and given properties in CSS, but I thought that maybe JS would interfere. Didn’t get time to try it today, but thoughts?