this.canvas = document.createElement('canvas'); this.canvas.width = ... this.canvas.height = ... //... document.body.appendChild(this.canvas);