allow passing a canvas element