Alternatively, you can check this :
It also uses canvas but store all the pixels in an array for better performances (regarding my own "engine").
Still, it's a tricky and slow solution.
If you want more explanations about this, just do a forum research on "worms" and "per pixel".