I'm trying to use an animation as an background in java script. But when I try to do so I'm getting two problems. First I'm unable to set it as a background with js and even after I manage to use it as background with css, height of animation get messed up. i referred to question #41179264 but can't get it working.
canvas.height = window.innerHeight;
What is the correct way to set an java script as background without disturbing other element of webpage (just efficient as bgcolor in html) and how to get complete height of webpage?