In my experience it’s also a good idea to explicitly set the width and height (or you can end up with a 0x0 canvas, which is a tad hard to see ! Maybe add a class and some CSS, or do it in the JS, for example:
Thanks @PolGuixe and @robfallows. Setting up a canvas element solves the problem. And knowing how to set the canvas attributes in JS is helpful as well!
I just started a new meteor app and am trying to get started using canvas so copied the above code into the main.html and the main.js files and do not get any results when viewed in Firefox. Am I missing something?