Then like. How would the canvas elements appear in document. is it in javascript itself like.
document.createElement("canvas");
Yes, to use html, you need to build the html from the js file itself like you described.